home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume15 / gnuplot2 / patch03 < prev    next >
Encoding:
Text File  |  1990-10-05  |  66.2 KB  |  2,626 lines

  1. Newsgroups: comp.sources.misc
  2. X-UNIX-From: eln272v@monu1.cc.monash.edu.au
  3. from: Russell Lang <rjl@monu1.cc.monash.edu.au>
  4. subject: v15i018: gnuplot 2.0 patch 1 (3 of 4) 
  5. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  6.  
  7. Posting-number: Volume 15, Issue 18
  8. Submitted-by: Russell Lang <rjl@monu1.cc.monash.edu.au>
  9. Archive-name: gnuplot2/patch03
  10.  
  11. #! /bin/sh
  12. # This is a shell archive.  Remove anything before this line, then unpack
  13. # it by saving it into a file and typing "sh file".  To overwrite existing
  14. # files, type "sh file -c".  You can also feed this as standard input via
  15. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  16. # will see the following message at the end:
  17. #        "End of shell archive."
  18. # Contents:  patch1b
  19. # Wrapped by eln272v@monu1 on Tue Sep 18 14:52:59 1990
  20. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  21. if test -f patch1b -a "${1}" != "-c" ; then 
  22.   echo shar: Will not over-write existing file \"patch1b\"
  23. else
  24. echo shar: Extracting \"patch1b\" \(63974 characters\)
  25. sed "s/^X//" >patch1b <<'END_OF_patch1b'
  26. X*** ./graphics.c    Tue Mar 27 09:01:22 1990
  27. X--- ../patch1/graphics.c    Mon Sep 10 09:57:37 1990
  28. X***************
  29. X*** 60,66
  30. X  static int xleft, xright, ybot, ytop;
  31. X  
  32. X  /* Boundary and scale factors, in user coordinates */
  33. X! static double xmin, xmax, ymin, ymax;
  34. X  static double xscale, yscale;
  35. X  
  36. X  /* And the functions to map from user to terminal coordinates */
  37. X
  38. X--- 60,69 -----
  39. X  static int xleft, xright, ybot, ytop;
  40. X  
  41. X  /* Boundary and scale factors, in user coordinates */
  42. X! /* x_min, x_max, y_min, y_max are local to this file and
  43. X!  * are not the same as variables of the same names in other files
  44. X!  */
  45. X! static double x_min, x_max, y_min, y_max;
  46. X  static double xscale, yscale;
  47. X  
  48. X  /* And the functions to map from user to terminal coordinates */
  49. X***************
  50. X*** 64,71
  51. X  static double xscale, yscale;
  52. X  
  53. X  /* And the functions to map from user to terminal coordinates */
  54. X! #define map_x(x) (int)(xleft+(x-xmin)*xscale+0.5) /* maps floating point x to screen */ 
  55. X! #define map_y(y) (int)(ybot+(y-ymin)*yscale+0.5)    /* same for y */
  56. X  
  57. X  /* (DFK) Watch for cancellation error near zero on axes labels */
  58. X  #define SIGNIF (0.01)        /* less than one hundredth of a tic mark */
  59. X
  60. X--- 67,74 -----
  61. X  static double xscale, yscale;
  62. X  
  63. X  /* And the functions to map from user to terminal coordinates */
  64. X! #define map_x(x) (int)(xleft+(x-x_min)*xscale+0.5) /* maps floating point x to screen */ 
  65. X! #define map_y(y) (int)(ybot+(y-y_min)*yscale+0.5)    /* same for y */
  66. X  
  67. X  /* (DFK) Watch for cancellation error near zero on axes labels */
  68. X  #define SIGNIF (0.01)        /* less than one hundredth of a tic mark */
  69. X***************
  70. X*** 108,115
  71. X            int_error(errbuf, NO_CARET);
  72. X         } else
  73. X          return(log10(coord));
  74. X-     } else {
  75. X-        return(coord);
  76. X      }
  77. X      return((double)NULL); /* shut lint up */
  78. X  }
  79. X
  80. X--- 111,116 -----
  81. X            int_error(errbuf, NO_CARET);
  82. X         } else
  83. X          return(log10(coord));
  84. X      }
  85. X      return(coord);
  86. X  }
  87. X***************
  88. X*** 111,117
  89. X      } else {
  90. X         return(coord);
  91. X      }
  92. X!     return((double)NULL); /* shut lint up */
  93. X  }
  94. X  
  95. X  /* borders of plotting area */
  96. X
  97. X--- 112,118 -----
  98. X         } else
  99. X          return(log10(coord));
  100. X      }
  101. X!     return(coord);
  102. X  }
  103. X  
  104. X  /* borders of plotting area */
  105. X***************
  106. X*** 187,196
  107. X  
  108. X  /* store these in variables global to this file */
  109. X  /* otherwise, we have to pass them around a lot */
  110. X!      xmin = min_x;
  111. X!      xmax = max_x; 
  112. X!      ymin = min_y;
  113. X!      ymax = max_y;
  114. X  
  115. X      if (polar) {
  116. X          /* will possibly change xmin, xmax, ymin, ymax */
  117. X
  118. X--- 188,197 -----
  119. X  
  120. X  /* store these in variables global to this file */
  121. X  /* otherwise, we have to pass them around a lot */
  122. X!      x_min = min_x;
  123. X!      x_max = max_x; 
  124. X!      y_min = min_y;
  125. X!      y_max = max_y;
  126. X  
  127. X      if (polar) {
  128. X          /* will possibly change x_min, x_max, y_min, y_max */
  129. X***************
  130. X*** 193,199
  131. X       ymax = max_y;
  132. X  
  133. X      if (polar) {
  134. X!         /* will possibly change xmin, xmax, ymin, ymax */
  135. X          polar_xform(plots,pcount);
  136. X      }
  137. X  
  138. X
  139. X--- 194,200 -----
  140. X       y_max = max_y;
  141. X  
  142. X      if (polar) {
  143. X!         /* will possibly change x_min, x_max, y_min, y_max */
  144. X          polar_xform(plots,pcount);
  145. X      }
  146. X  
  147. X***************
  148. X*** 197,203
  149. X          polar_xform(plots,pcount);
  150. X      }
  151. X  
  152. X!     if (ymin == VERYLARGE || ymax == -VERYLARGE)
  153. X          int_error("all points undefined!", NO_CARET);
  154. X  
  155. X      if (xmin == VERYLARGE || xmax == -VERYLARGE)
  156. X
  157. X--- 198,204 -----
  158. X          polar_xform(plots,pcount);
  159. X      }
  160. X  
  161. X!     if (y_min == VERYLARGE || y_max == -VERYLARGE)
  162. X          int_error("all points undefined!", NO_CARET);
  163. X  
  164. X      if (x_min == VERYLARGE || x_max == -VERYLARGE)
  165. X***************
  166. X*** 200,206
  167. X      if (ymin == VERYLARGE || ymax == -VERYLARGE)
  168. X          int_error("all points undefined!", NO_CARET);
  169. X  
  170. X!     if (xmin == VERYLARGE || xmax == -VERYLARGE)
  171. X          int_error("all points undefined!", NO_CARET);
  172. X  
  173. X  /*    Apply the desired viewport offsets. */
  174. X
  175. X--- 201,207 -----
  176. X      if (y_min == VERYLARGE || y_max == -VERYLARGE)
  177. X          int_error("all points undefined!", NO_CARET);
  178. X  
  179. X!     if (x_min == VERYLARGE || x_max == -VERYLARGE)
  180. X          int_error("all points undefined!", NO_CARET);
  181. X  
  182. X  /*    Apply the desired viewport offsets. */
  183. X***************
  184. X*** 204,212
  185. X          int_error("all points undefined!", NO_CARET);
  186. X  
  187. X  /*    Apply the desired viewport offsets. */
  188. X!      if (ymin < ymax) {
  189. X!         ymin -= boff;
  190. X!         ymax += toff;
  191. X      } else {
  192. X          ymax -= boff;
  193. X          ymin += toff;
  194. X
  195. X--- 205,213 -----
  196. X          int_error("all points undefined!", NO_CARET);
  197. X  
  198. X  /*    Apply the desired viewport offsets. */
  199. X!      if (y_min < y_max) {
  200. X!         y_min -= boff;
  201. X!         y_max += toff;
  202. X      } else {
  203. X          y_max -= boff;
  204. X          y_min += toff;
  205. X***************
  206. X*** 208,215
  207. X          ymin -= boff;
  208. X          ymax += toff;
  209. X      } else {
  210. X!         ymax -= boff;
  211. X!         ymin += toff;
  212. X      }
  213. X       if (xmin < xmax) {
  214. X          xmin -= loff;
  215. X
  216. X--- 209,216 -----
  217. X          y_min -= boff;
  218. X          y_max += toff;
  219. X      } else {
  220. X!         y_max -= boff;
  221. X!         y_min += toff;
  222. X      }
  223. X       if (x_min < x_max) {
  224. X          x_min -= loff;
  225. X***************
  226. X*** 211,219
  227. X          ymax -= boff;
  228. X          ymin += toff;
  229. X      }
  230. X!      if (xmin < xmax) {
  231. X!         xmin -= loff;
  232. X!         xmax += roff;
  233. X      } else {
  234. X          xmax -= loff;
  235. X          xmin += roff;
  236. X
  237. X--- 212,220 -----
  238. X          y_max -= boff;
  239. X          y_min += toff;
  240. X      }
  241. X!      if (x_min < x_max) {
  242. X!         x_min -= loff;
  243. X!         x_max += roff;
  244. X      } else {
  245. X          x_max -= loff;
  246. X          x_min += roff;
  247. X***************
  248. X*** 215,222
  249. X          xmin -= loff;
  250. X          xmax += roff;
  251. X      } else {
  252. X!         xmax -= loff;
  253. X!         xmin += roff;
  254. X      }
  255. X  
  256. X  /* SETUP RANGES, SCALES AND TIC PLACES */
  257. X
  258. X--- 216,223 -----
  259. X          x_min -= loff;
  260. X          x_max += roff;
  261. X      } else {
  262. X!         x_max -= loff;
  263. X!         x_min += roff;
  264. X      }
  265. X  
  266. X  /* SETUP RANGES, SCALES AND TIC PLACES */
  267. X***************
  268. X*** 221,227
  269. X  
  270. X  /* SETUP RANGES, SCALES AND TIC PLACES */
  271. X      if (ytics && yticdef.type == TIC_COMPUTED) {
  272. X!        ytic = make_tics(ymin,ymax,log_y);
  273. X      
  274. X         if (autoscale_ly) {
  275. X            if (ymin < ymax) {
  276. X
  277. X--- 222,228 -----
  278. X  
  279. X  /* SETUP RANGES, SCALES AND TIC PLACES */
  280. X      if (ytics && yticdef.type == TIC_COMPUTED) {
  281. X!        ytic = make_tics(y_min,y_max,log_y);
  282. X      
  283. X         if (autoscale_ly) {
  284. X            if (y_min < y_max) {
  285. X***************
  286. X*** 224,232
  287. X         ytic = make_tics(ymin,ymax,log_y);
  288. X      
  289. X         if (autoscale_ly) {
  290. X!           if (ymin < ymax) {
  291. X!              ymin = ytic * floor(ymin/ytic);       
  292. X!              ymax = ytic * ceil(ymax/ytic);
  293. X            }
  294. X            else {            /* reverse axis */
  295. X               ymin = ytic * ceil(ymin/ytic);       
  296. X
  297. X--- 225,233 -----
  298. X         ytic = make_tics(y_min,y_max,log_y);
  299. X      
  300. X         if (autoscale_ly) {
  301. X!           if (y_min < y_max) {
  302. X!              y_min = ytic * floor(y_min/ytic);       
  303. X!              y_max = ytic * ceil(y_max/ytic);
  304. X            }
  305. X            else {            /* reverse axis */
  306. X               y_min = ytic * ceil(y_min/ytic);       
  307. X***************
  308. X*** 229,236
  309. X               ymax = ytic * ceil(ymax/ytic);
  310. X            }
  311. X            else {            /* reverse axis */
  312. X!              ymin = ytic * ceil(ymin/ytic);       
  313. X!              ymax = ytic * floor(ymax/ytic);
  314. X            }
  315. X         }
  316. X      }
  317. X
  318. X--- 230,237 -----
  319. X               y_max = ytic * ceil(y_max/ytic);
  320. X            }
  321. X            else {            /* reverse axis */
  322. X!              y_min = ytic * ceil(y_min/ytic);       
  323. X!              y_max = ytic * floor(y_max/ytic);
  324. X            }
  325. X         }
  326. X      }
  327. X***************
  328. X*** 236,242
  329. X      }
  330. X  
  331. X      if (xtics && xticdef.type == TIC_COMPUTED) {
  332. X!        xtic = make_tics(xmin,xmax,log_x);
  333. X         
  334. X         if (autoscale_lx) {
  335. X            if (xmin < xmax) {
  336. X
  337. X--- 237,243 -----
  338. X      }
  339. X  
  340. X      if (xtics && xticdef.type == TIC_COMPUTED) {
  341. X!        xtic = make_tics(x_min,x_max,log_x);
  342. X         
  343. X         if (autoscale_lx) {
  344. X            if (x_min < x_max) {
  345. X***************
  346. X*** 239,247
  347. X         xtic = make_tics(xmin,xmax,log_x);
  348. X         
  349. X         if (autoscale_lx) {
  350. X!           if (xmin < xmax) {
  351. X!              xmin = xtic * floor(xmin/xtic);    
  352. X!              xmax = xtic * ceil(xmax/xtic);
  353. X            } else {
  354. X               xmin = xtic * ceil(xmin/xtic);
  355. X               xmax = xtic * floor(xmax/xtic);    
  356. X
  357. X--- 240,248 -----
  358. X         xtic = make_tics(x_min,x_max,log_x);
  359. X         
  360. X         if (autoscale_lx) {
  361. X!           if (x_min < x_max) {
  362. X!              x_min = xtic * floor(x_min/xtic);    
  363. X!              x_max = xtic * ceil(x_max/xtic);
  364. X            } else {
  365. X               x_min = xtic * ceil(x_min/xtic);
  366. X               x_max = xtic * floor(x_max/xtic);    
  367. X***************
  368. X*** 243,250
  369. X               xmin = xtic * floor(xmin/xtic);    
  370. X               xmax = xtic * ceil(xmax/xtic);
  371. X            } else {
  372. X!              xmin = xtic * ceil(xmin/xtic);
  373. X!              xmax = xtic * floor(xmax/xtic);    
  374. X            }
  375. X         }
  376. X      }
  377. X
  378. X--- 244,251 -----
  379. X               x_min = xtic * floor(x_min/xtic);    
  380. X               x_max = xtic * ceil(x_max/xtic);
  381. X            } else {
  382. X!              x_min = xtic * ceil(x_min/xtic);
  383. X!              x_max = xtic * floor(x_max/xtic);    
  384. X            }
  385. X         }
  386. X      }
  387. X***************
  388. X*** 249,259
  389. X         }
  390. X      }
  391. X  
  392. X! /*    This used be xmax == xmin, but that caused an infinite loop once. */
  393. X!     if (fabs(xmax - xmin) < zero)
  394. X!         int_error("xmin should not equal xmax!",NO_CARET);
  395. X!     if (fabs(ymax - ymin) < zero)
  396. X!         int_error("ymin should not equal ymax!",NO_CARET);
  397. X  
  398. X  /* INITIALIZE TERMINAL */
  399. X      if (!term_init) {
  400. X
  401. X--- 250,260 -----
  402. X         }
  403. X      }
  404. X  
  405. X! /*    This used be x_max == x_min, but that caused an infinite loop once. */
  406. X!     if (fabs(x_max - x_min) < zero)
  407. X!         int_error("x_min should not equal x_max!",NO_CARET);
  408. X!     if (fabs(y_max - y_min) < zero)
  409. X!         int_error("y_min should not equal y_max!",NO_CARET);
  410. X  
  411. X  /* INITIALIZE TERMINAL */
  412. X      if (!term_init) {
  413. X***************
  414. X*** 268,275
  415. X       boundary(scaling);
  416. X  
  417. X  /* SCALE FACTORS */
  418. X!     yscale = (ytop - ybot)/(ymax - ymin);
  419. X!     xscale = (xright - xleft)/(xmax - xmin);
  420. X      
  421. X  /* DRAW AXES */
  422. X      (*t->linetype)(-1);    /* axis line type */
  423. X
  424. X--- 269,276 -----
  425. X       boundary(scaling);
  426. X  
  427. X  /* SCALE FACTORS */
  428. X!     yscale = (ytop - ybot)/(y_max - y_min);
  429. X!     xscale = (xright - xleft)/(x_max - x_min);
  430. X      
  431. X  /* DRAW AXES */
  432. X      (*t->linetype)(-1);    /* axis line type */
  433. X***************
  434. X*** 297,304
  435. X       if (ytics) {
  436. X          switch (yticdef.type) {
  437. X             case TIC_COMPUTED: {
  438. X!                if (ymin < ymax)
  439. X!                 draw_ytics(ytic * floor(ymin/ytic),
  440. X                          ytic,
  441. X                          ytic * ceil(ymax/ytic));
  442. X                else
  443. X
  444. X--- 298,305 -----
  445. X       if (ytics) {
  446. X          switch (yticdef.type) {
  447. X             case TIC_COMPUTED: {
  448. X!                if (y_min < y_max)
  449. X!                 draw_ytics(ytic * floor(y_min/ytic),
  450. X                          ytic,
  451. X                          ytic * ceil(y_max/ytic));
  452. X                else
  453. X***************
  454. X*** 300,306
  455. X                 if (ymin < ymax)
  456. X                  draw_ytics(ytic * floor(ymin/ytic),
  457. X                          ytic,
  458. X!                         ytic * ceil(ymax/ytic));
  459. X                else
  460. X                  draw_ytics(ytic * floor(ymax/ytic),
  461. X                          ytic,
  462. X
  463. X--- 301,307 -----
  464. X                 if (y_min < y_max)
  465. X                  draw_ytics(ytic * floor(y_min/ytic),
  466. X                          ytic,
  467. X!                         ytic * ceil(y_max/ytic));
  468. X                else
  469. X                  draw_ytics(ytic * floor(y_max/ytic),
  470. X                          ytic,
  471. X***************
  472. X*** 302,308
  473. X                          ytic,
  474. X                          ytic * ceil(ymax/ytic));
  475. X                else
  476. X!                 draw_ytics(ytic * floor(ymax/ytic),
  477. X                          ytic,
  478. X                          ytic * ceil(ymin/ytic));
  479. X  
  480. X
  481. X--- 303,309 -----
  482. X                          ytic,
  483. X                          ytic * ceil(y_max/ytic));
  484. X                else
  485. X!                 draw_ytics(ytic * floor(y_max/ytic),
  486. X                          ytic,
  487. X                          ytic * ceil(y_min/ytic));
  488. X  
  489. X***************
  490. X*** 304,310
  491. X                else
  492. X                  draw_ytics(ytic * floor(ymax/ytic),
  493. X                          ytic,
  494. X!                         ytic * ceil(ymin/ytic));
  495. X  
  496. X                break;
  497. X             }
  498. X
  499. X--- 305,311 -----
  500. X                else
  501. X                  draw_ytics(ytic * floor(y_max/ytic),
  502. X                          ytic,
  503. X!                         ytic * ceil(y_min/ytic));
  504. X  
  505. X                break;
  506. X             }
  507. X***************
  508. X*** 309,317
  509. X                break;
  510. X             }
  511. X             case TIC_SERIES: {
  512. X!               draw_ytics(yticdef.def.series.start, 
  513. X!                       yticdef.def.series.incr, 
  514. X!                       yticdef.def.series.end);
  515. X                break;
  516. X             }
  517. X             case TIC_USER: {
  518. X
  519. X--- 310,318 -----
  520. X                break;
  521. X             }
  522. X             case TIC_SERIES: {
  523. X!               draw_series_ytics(yticdef.def.series.start, 
  524. X!                             yticdef.def.series.incr, 
  525. X!                             yticdef.def.series.end);
  526. X                break;
  527. X             }
  528. X             case TIC_USER: {
  529. X***************
  530. X*** 315,321
  531. X                break;
  532. X             }
  533. X             case TIC_USER: {
  534. X!               draw_user_ytics(yticdef.def.user);
  535. X                break;
  536. X             }
  537. X             default: {
  538. X
  539. X--- 316,322 -----
  540. X                break;
  541. X             }
  542. X             case TIC_USER: {
  543. X!               draw_set_ytics(yticdef.def.user);
  544. X                break;
  545. X             }
  546. X             default: {
  547. X***************
  548. X*** 331,338
  549. X       if (xtics) {
  550. X          switch (xticdef.type) {
  551. X             case TIC_COMPUTED: {
  552. X!                if (xmin < xmax)
  553. X!                 draw_xtics(xtic * floor(xmin/xtic),
  554. X                          xtic,
  555. X                          xtic * ceil(xmax/xtic));
  556. X                else
  557. X
  558. X--- 332,339 -----
  559. X       if (xtics) {
  560. X          switch (xticdef.type) {
  561. X             case TIC_COMPUTED: {
  562. X!                if (x_min < x_max)
  563. X!                 draw_xtics(xtic * floor(x_min/xtic),
  564. X                          xtic,
  565. X                          xtic * ceil(x_max/xtic));
  566. X                else
  567. X***************
  568. X*** 334,340
  569. X                 if (xmin < xmax)
  570. X                  draw_xtics(xtic * floor(xmin/xtic),
  571. X                          xtic,
  572. X!                         xtic * ceil(xmax/xtic));
  573. X                else
  574. X                  draw_xtics(xtic * floor(xmax/xtic),
  575. X                          xtic,
  576. X
  577. X--- 335,341 -----
  578. X                 if (x_min < x_max)
  579. X                  draw_xtics(xtic * floor(x_min/xtic),
  580. X                          xtic,
  581. X!                         xtic * ceil(x_max/xtic));
  582. X                else
  583. X                  draw_xtics(xtic * floor(x_max/xtic),
  584. X                          xtic,
  585. X***************
  586. X*** 336,342
  587. X                          xtic,
  588. X                          xtic * ceil(xmax/xtic));
  589. X                else
  590. X!                 draw_xtics(xtic * floor(xmax/xtic),
  591. X                          xtic,
  592. X                          xtic * ceil(xmin/xtic));
  593. X  
  594. X
  595. X--- 337,343 -----
  596. X                          xtic,
  597. X                          xtic * ceil(x_max/xtic));
  598. X                else
  599. X!                 draw_xtics(xtic * floor(x_max/xtic),
  600. X                          xtic,
  601. X                          xtic * ceil(x_min/xtic));
  602. X  
  603. X***************
  604. X*** 338,344
  605. X                else
  606. X                  draw_xtics(xtic * floor(xmax/xtic),
  607. X                          xtic,
  608. X!                         xtic * ceil(xmin/xtic));
  609. X  
  610. X                break;
  611. X             }
  612. X
  613. X--- 339,345 -----
  614. X                else
  615. X                  draw_xtics(xtic * floor(x_max/xtic),
  616. X                          xtic,
  617. X!                         xtic * ceil(x_min/xtic));
  618. X  
  619. X                break;
  620. X             }
  621. X***************
  622. X*** 343,351
  623. X                break;
  624. X             }
  625. X             case TIC_SERIES: {
  626. X!               draw_xtics(xticdef.def.series.start, 
  627. X!                       xticdef.def.series.incr, 
  628. X!                       xticdef.def.series.end);
  629. X                break;
  630. X             }
  631. X             case TIC_USER: {
  632. X
  633. X--- 344,352 -----
  634. X                break;
  635. X             }
  636. X             case TIC_SERIES: {
  637. X!               draw_series_xtics(xticdef.def.series.start, 
  638. X!                             xticdef.def.series.incr, 
  639. X!                             xticdef.def.series.end);
  640. X                break;
  641. X             }
  642. X             case TIC_USER: {
  643. X***************
  644. X*** 349,355
  645. X                break;
  646. X             }
  647. X             case TIC_USER: {
  648. X!               draw_user_xtics(xticdef.def.user);
  649. X                break;
  650. X             }
  651. X             default: {
  652. X
  653. X--- 350,356 -----
  654. X                break;
  655. X             }
  656. X             case TIC_USER: {
  657. X!               draw_set_xtics(xticdef.def.user);
  658. X                break;
  659. X             }
  660. X             default: {
  661. X***************
  662. X*** 551,557
  663. X               break;
  664. X            }
  665. X            case OUTRANGE: {
  666. X!              if (!inrange(plot->points[i].x, xmin,xmax))
  667. X                 continue;
  668. X               x = map_x(plot->points[i].x);
  669. X               if ((ymin < ymax 
  670. X
  671. X--- 552,558 -----
  672. X               break;
  673. X            }
  674. X            case OUTRANGE: {
  675. X!              if (!inrange(plot->points[i].x, x_min,x_max))
  676. X                 continue;
  677. X               x = map_x(plot->points[i].x);
  678. X               if ((y_min < y_max 
  679. X***************
  680. X*** 554,569
  681. X               if (!inrange(plot->points[i].x, xmin,xmax))
  682. X                 continue;
  683. X               x = map_x(plot->points[i].x);
  684. X!              if ((ymin < ymax 
  685. X!                  && plot->points[i].y < ymin)
  686. X!                 || (ymax < ymin 
  687. X!                     && plot->points[i].y > ymin))
  688. X!                y = map_y(ymin);
  689. X!              if ((ymin < ymax 
  690. X!                  && plot->points[i].y > ymax)
  691. X!                 || (ymax<ymin 
  692. X!                     && plot->points[i].y < ymax))
  693. X!                y = map_y(ymax);
  694. X               break;
  695. X            }
  696. X            default:        /* just a safety */
  697. X
  698. X--- 555,570 -----
  699. X               if (!inrange(plot->points[i].x, x_min,x_max))
  700. X                 continue;
  701. X               x = map_x(plot->points[i].x);
  702. X!              if ((y_min < y_max 
  703. X!                  && plot->points[i].y < y_min)
  704. X!                 || (y_max < y_min 
  705. X!                     && plot->points[i].y > y_min))
  706. X!                y = map_y(y_min);
  707. X!              if ((y_min < y_max 
  708. X!                  && plot->points[i].y > y_max)
  709. X!                 || (y_max<y_min 
  710. X!                     && plot->points[i].y < y_max))
  711. X!                y = map_y(y_max);
  712. X               break;
  713. X            }
  714. X            default:        /* just a safety */
  715. X***************
  716. X*** 699,705
  717. X      int i;                /* line segment from point i-1 to point i */
  718. X      double *ex, *ey;        /* the point where it crosses an edge */
  719. X  {
  720. X!     /* global xmin, xmax, ymin, xmax */
  721. X      double ax = points[i-1].x;
  722. X      double ay = points[i-1].y;
  723. X      double bx = points[i].x;
  724. X
  725. X--- 700,706 -----
  726. X      int i;                /* line segment from point i-1 to point i */
  727. X      double *ex, *ey;        /* the point where it crosses an edge */
  728. X  {
  729. X!     /* global x_min, x_max, y_min, x_max */
  730. X      double ax = points[i-1].x;
  731. X      double ay = points[i-1].y;
  732. X      double bx = points[i].x;
  733. X***************
  734. X*** 708,714
  735. X  
  736. X      if (by == ay) {
  737. X         /* horizontal line */
  738. X!        /* assume inrange(by, ymin, ymax) */
  739. X         *ey = by;        /* == ay */
  740. X  
  741. X         if (inrange(xmax, ax, bx))
  742. X
  743. X--- 709,715 -----
  744. X  
  745. X      if (by == ay) {
  746. X         /* horizontal line */
  747. X!        /* assume inrange(by, y_min, y_max) */
  748. X         *ey = by;        /* == ay */
  749. X  
  750. X         if (inrange(x_max, ax, bx))
  751. X***************
  752. X*** 711,720
  753. X         /* assume inrange(by, ymin, ymax) */
  754. X         *ey = by;        /* == ay */
  755. X  
  756. X!        if (inrange(xmax, ax, bx))
  757. X!         *ex = xmax;
  758. X!        else if (inrange(xmin, ax, bx))
  759. X!         *ex = xmin;
  760. X         else {
  761. X          (*term_tbl[term].text)();
  762. X          (void) fflush(outfile);
  763. X
  764. X--- 712,721 -----
  765. X         /* assume inrange(by, y_min, y_max) */
  766. X         *ey = by;        /* == ay */
  767. X  
  768. X!        if (inrange(x_max, ax, bx))
  769. X!         *ex = x_max;
  770. X!        else if (inrange(x_min, ax, bx))
  771. X!         *ex = x_min;
  772. X         else {
  773. X          (*term_tbl[term].text)();
  774. X          (void) fflush(outfile);
  775. X***************
  776. X*** 723,729
  777. X         return;
  778. X      } else if (bx == ax) {
  779. X         /* vertical line */
  780. X!        /* assume inrange(bx, xmin, xmax) */
  781. X         *ex = bx;        /* == ax */
  782. X  
  783. X         if (inrange(ymax, ay, by))
  784. X
  785. X--- 724,730 -----
  786. X         return;
  787. X      } else if (bx == ax) {
  788. X         /* vertical line */
  789. X!        /* assume inrange(bx, x_min, x_max) */
  790. X         *ex = bx;        /* == ax */
  791. X  
  792. X         if (inrange(y_max, ay, by))
  793. X***************
  794. X*** 726,735
  795. X         /* assume inrange(bx, xmin, xmax) */
  796. X         *ex = bx;        /* == ax */
  797. X  
  798. X!        if (inrange(ymax, ay, by))
  799. X!         *ey = ymax;
  800. X!        else if (inrange(ymin, ay, by))
  801. X!         *ey = ymin;
  802. X         else {
  803. X          (*term_tbl[term].text)();
  804. X          (void) fflush(outfile);
  805. X
  806. X--- 727,736 -----
  807. X         /* assume inrange(bx, x_min, x_max) */
  808. X         *ex = bx;        /* == ax */
  809. X  
  810. X!        if (inrange(y_max, ay, by))
  811. X!         *ey = y_max;
  812. X!        else if (inrange(y_min, ay, by))
  813. X!         *ey = y_min;
  814. X         else {
  815. X          (*term_tbl[term].text)();
  816. X          (void) fflush(outfile);
  817. X***************
  818. X*** 740,749
  819. X  
  820. X      /* slanted line of some kind */
  821. X  
  822. X!     /* does it intersect ymin edge */
  823. X!     if (inrange(ymin, ay, by) && ymin != ay && ymin != by) {
  824. X!        x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
  825. X!        if (inrange(x, xmin, xmax)) {
  826. X            *ex = x;
  827. X            *ey = ymin;
  828. X            return;            /* yes */
  829. X
  830. X--- 741,750 -----
  831. X  
  832. X      /* slanted line of some kind */
  833. X  
  834. X!     /* does it intersect y_min edge */
  835. X!     if (inrange(y_min, ay, by) && y_min != ay && y_min != by) {
  836. X!        x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
  837. X!        if (inrange(x, x_min, x_max)) {
  838. X            *ex = x;
  839. X            *ey = y_min;
  840. X            return;            /* yes */
  841. X***************
  842. X*** 745,751
  843. X         x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
  844. X         if (inrange(x, xmin, xmax)) {
  845. X            *ex = x;
  846. X!           *ey = ymin;
  847. X            return;            /* yes */
  848. X         }
  849. X      }
  850. X
  851. X--- 746,752 -----
  852. X         x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
  853. X         if (inrange(x, x_min, x_max)) {
  854. X            *ex = x;
  855. X!           *ey = y_min;
  856. X            return;            /* yes */
  857. X         }
  858. X      }
  859. X***************
  860. X*** 750,759
  861. X         }
  862. X      }
  863. X      
  864. X!     /* does it intersect ymax edge */
  865. X!     if (inrange(ymax, ay, by) && ymax != ay && ymax != by) {
  866. X!        x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
  867. X!        if (inrange(x, xmin, xmax)) {
  868. X            *ex = x;
  869. X            *ey = ymax;
  870. X            return;            /* yes */
  871. X
  872. X--- 751,760 -----
  873. X         }
  874. X      }
  875. X      
  876. X!     /* does it intersect y_max edge */
  877. X!     if (inrange(y_max, ay, by) && y_max != ay && y_max != by) {
  878. X!        x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
  879. X!        if (inrange(x, x_min, x_max)) {
  880. X            *ex = x;
  881. X            *ey = y_max;
  882. X            return;            /* yes */
  883. X***************
  884. X*** 755,761
  885. X         x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
  886. X         if (inrange(x, xmin, xmax)) {
  887. X            *ex = x;
  888. X!           *ey = ymax;
  889. X            return;            /* yes */
  890. X         }
  891. X      }
  892. X
  893. X--- 756,762 -----
  894. X         x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
  895. X         if (inrange(x, x_min, x_max)) {
  896. X            *ex = x;
  897. X!           *ey = y_max;
  898. X            return;            /* yes */
  899. X         }
  900. X      }
  901. X***************
  902. X*** 760,770
  903. X         }
  904. X      }
  905. X  
  906. X!     /* does it intersect xmin edge */
  907. X!     if (inrange(xmin, ax, bx) && xmin != ax && xmin != bx) {
  908. X!        y = ay + (xmin-ax) * ((by-ay) / (bx-ax));
  909. X!        if (inrange(y, ymin, ymax)) {
  910. X!           *ex = xmin;
  911. X            *ey = y;
  912. X            return;
  913. X         }
  914. X
  915. X--- 761,771 -----
  916. X         }
  917. X      }
  918. X  
  919. X!     /* does it intersect x_min edge */
  920. X!     if (inrange(x_min, ax, bx) && x_min != ax && x_min != bx) {
  921. X!        y = ay + (x_min-ax) * ((by-ay) / (bx-ax));
  922. X!        if (inrange(y, y_min, y_max)) {
  923. X!           *ex = x_min;
  924. X            *ey = y;
  925. X            return;
  926. X         }
  927. X***************
  928. X*** 770,780
  929. X         }
  930. X      }
  931. X  
  932. X!     /* does it intersect xmax edge */
  933. X!     if (inrange(xmax, ax, bx) && xmax != ax && xmax != bx) {
  934. X!        y = ay + (xmax-ax) * ((by-ay) / (bx-ax));
  935. X!        if (inrange(y, ymin, ymax)) {
  936. X!           *ex = xmax;
  937. X            *ey = y;
  938. X            return;
  939. X         }
  940. X
  941. X--- 771,781 -----
  942. X         }
  943. X      }
  944. X  
  945. X!     /* does it intersect x_max edge */
  946. X!     if (inrange(x_max, ax, bx) && x_max != ax && x_max != bx) {
  947. X!        y = ay + (x_max-ax) * ((by-ay) / (bx-ax));
  948. X!        if (inrange(y, y_min, y_max)) {
  949. X!           *ex = x_max;
  950. X            *ey = y;
  951. X            return;
  952. X         }
  953. X***************
  954. X*** 791,797
  955. X      */
  956. X      if (ax == -VERYLARGE) {
  957. X         if (ay != -VERYLARGE) {
  958. X!           *ex = min(xmin, xmax);
  959. X            *ey = by;
  960. X            return;
  961. X         }
  962. X
  963. X--- 792,798 -----
  964. X      */
  965. X      if (ax == -VERYLARGE) {
  966. X         if (ay != -VERYLARGE) {
  967. X!           *ex = min(x_min, x_max);
  968. X            *ey = by;
  969. X            return;
  970. X         }
  971. X***************
  972. X*** 797,803
  973. X         }
  974. X      } else if (bx == -VERYLARGE) {
  975. X         if (by != -VERYLARGE) {
  976. X!           *ex = min(xmin, xmax);
  977. X            *ey = ay;
  978. X            return;
  979. X         }
  980. X
  981. X--- 798,804 -----
  982. X         }
  983. X      } else if (bx == -VERYLARGE) {
  984. X         if (by != -VERYLARGE) {
  985. X!           *ex = min(x_min, x_max);
  986. X            *ey = ay;
  987. X            return;
  988. X         }
  989. X***************
  990. X*** 804,810
  991. X      } else if (ay == -VERYLARGE) {
  992. X         /* note we know ax != -VERYLARGE */
  993. X         *ex = bx;
  994. X!        *ey = min(ymin, ymax);
  995. X         return;
  996. X      } else if (by == -VERYLARGE) {
  997. X         /* note we know bx != -VERYLARGE */
  998. X
  999. X--- 805,811 -----
  1000. X      } else if (ay == -VERYLARGE) {
  1001. X         /* note we know ax != -VERYLARGE */
  1002. X         *ex = bx;
  1003. X!        *ey = min(y_min, y_max);
  1004. X         return;
  1005. X      } else if (by == -VERYLARGE) {
  1006. X         /* note we know bx != -VERYLARGE */
  1007. X***************
  1008. X*** 809,815
  1009. X      } else if (by == -VERYLARGE) {
  1010. X         /* note we know bx != -VERYLARGE */
  1011. X         *ex = ax;
  1012. X!        *ey = min(ymin, ymax);
  1013. X         return;
  1014. X      }
  1015. X  
  1016. X
  1017. X--- 810,816 -----
  1018. X      } else if (by == -VERYLARGE) {
  1019. X         /* note we know bx != -VERYLARGE */
  1020. X         *ex = ax;
  1021. X!        *ey = min(y_min, y_max);
  1022. X         return;
  1023. X      }
  1024. X  
  1025. X***************
  1026. X*** 846,852
  1027. X      int i;                /* line segment from point i-1 to point i */
  1028. X      double *lx, *ly;        /* lx[2], ly[2]: points where it crosses edges */
  1029. X  {
  1030. X!     /* global xmin, xmax, ymin, xmax */
  1031. X      double ax = points[i-1].x;
  1032. X      double ay = points[i-1].y;
  1033. X      double bx = points[i].x;
  1034. X
  1035. X--- 847,853 -----
  1036. X      int i;                /* line segment from point i-1 to point i */
  1037. X      double *lx, *ly;        /* lx[2], ly[2]: points where it crosses edges */
  1038. X  {
  1039. X!     /* global x_min, x_max, y_min, x_max */
  1040. X      double ax = points[i-1].x;
  1041. X      double ay = points[i-1].y;
  1042. X      double bx = points[i].x;
  1043. X***************
  1044. X*** 856,865
  1045. X  
  1046. X      if (by == ay) {
  1047. X         /* horizontal line */
  1048. X!        /* y coord must be in range, and line must span both xmin and xmax */
  1049. X!        /* note that spanning xmin implies spanning xmax */
  1050. X!        if (inrange(by, ymin, ymax) && inrange(xmin, ax, bx)) {
  1051. X!           *lx++ = xmin;
  1052. X            *ly++ = by;
  1053. X            *lx++ = xmax;
  1054. X            *ly++ = by;
  1055. X
  1056. X--- 857,866 -----
  1057. X  
  1058. X      if (by == ay) {
  1059. X         /* horizontal line */
  1060. X!        /* y coord must be in range, and line must span both x_min and x_max */
  1061. X!        /* note that spanning x_min implies spanning x_max */
  1062. X!        if (inrange(by, y_min, y_max) && inrange(x_min, ax, bx)) {
  1063. X!           *lx++ = x_min;
  1064. X            *ly++ = by;
  1065. X            *lx++ = x_max;
  1066. X            *ly++ = by;
  1067. X***************
  1068. X*** 861,867
  1069. X         if (inrange(by, ymin, ymax) && inrange(xmin, ax, bx)) {
  1070. X            *lx++ = xmin;
  1071. X            *ly++ = by;
  1072. X!           *lx++ = xmax;
  1073. X            *ly++ = by;
  1074. X            return(TRUE);
  1075. X         } else
  1076. X
  1077. X--- 862,868 -----
  1078. X         if (inrange(by, y_min, y_max) && inrange(x_min, ax, bx)) {
  1079. X            *lx++ = x_min;
  1080. X            *ly++ = by;
  1081. X!           *lx++ = x_max;
  1082. X            *ly++ = by;
  1083. X            return(TRUE);
  1084. X         } else
  1085. X***************
  1086. X*** 868,876
  1087. X          return(FALSE);
  1088. X      } else if (bx == ax) {
  1089. X         /* vertical line */
  1090. X!        /* x coord must be in range, and line must span both ymin and ymax */
  1091. X!        /* note that spanning ymin implies spanning ymax */
  1092. X!        if (inrange(bx, xmin, xmax) && inrange(ymin, ay, by)) {
  1093. X            *lx++ = bx;
  1094. X            *ly++ = ymin;
  1095. X            *lx++ = bx;
  1096. X
  1097. X--- 869,877 -----
  1098. X          return(FALSE);
  1099. X      } else if (bx == ax) {
  1100. X         /* vertical line */
  1101. X!        /* x coord must be in range, and line must span both y_min and y_max */
  1102. X!        /* note that spanning y_min implies spanning y_max */
  1103. X!        if (inrange(bx, x_min, x_max) && inrange(y_min, ay, by)) {
  1104. X            *lx++ = bx;
  1105. X            *ly++ = y_min;
  1106. X            *lx++ = bx;
  1107. X***************
  1108. X*** 872,878
  1109. X         /* note that spanning ymin implies spanning ymax */
  1110. X         if (inrange(bx, xmin, xmax) && inrange(ymin, ay, by)) {
  1111. X            *lx++ = bx;
  1112. X!           *ly++ = ymin;
  1113. X            *lx++ = bx;
  1114. X            *ly++ = ymax;
  1115. X            return(TRUE);
  1116. X
  1117. X--- 873,879 -----
  1118. X         /* note that spanning y_min implies spanning y_max */
  1119. X         if (inrange(bx, x_min, x_max) && inrange(y_min, ay, by)) {
  1120. X            *lx++ = bx;
  1121. X!           *ly++ = y_min;
  1122. X            *lx++ = bx;
  1123. X            *ly++ = y_max;
  1124. X            return(TRUE);
  1125. X***************
  1126. X*** 874,880
  1127. X            *lx++ = bx;
  1128. X            *ly++ = ymin;
  1129. X            *lx++ = bx;
  1130. X!           *ly++ = ymax;
  1131. X            return(TRUE);
  1132. X         } else
  1133. X          return(FALSE);
  1134. X
  1135. X--- 875,881 -----
  1136. X            *lx++ = bx;
  1137. X            *ly++ = y_min;
  1138. X            *lx++ = bx;
  1139. X!           *ly++ = y_max;
  1140. X            return(TRUE);
  1141. X         } else
  1142. X          return(FALSE);
  1143. X***************
  1144. X*** 883,892
  1145. X      /* slanted line of some kind */
  1146. X      /* there can be only zero or two intersections below */
  1147. X  
  1148. X!     /* does it intersect ymin edge */
  1149. X!     if (inrange(ymin, ay, by)) {
  1150. X!        x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
  1151. X!        if (inrange(x, xmin, xmax)) {
  1152. X            *lx++ = x;
  1153. X            *ly++ = ymin;
  1154. X            intersect = TRUE;
  1155. X
  1156. X--- 884,893 -----
  1157. X      /* slanted line of some kind */
  1158. X      /* there can be only zero or two intersections below */
  1159. X  
  1160. X!     /* does it intersect y_min edge */
  1161. X!     if (inrange(y_min, ay, by)) {
  1162. X!        x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
  1163. X!        if (inrange(x, x_min, x_max)) {
  1164. X            *lx++ = x;
  1165. X            *ly++ = y_min;
  1166. X            intersect = TRUE;
  1167. X***************
  1168. X*** 888,894
  1169. X         x = ax + (ymin-ay) * ((bx-ax) / (by-ay));
  1170. X         if (inrange(x, xmin, xmax)) {
  1171. X            *lx++ = x;
  1172. X!           *ly++ = ymin;
  1173. X            intersect = TRUE;
  1174. X         }
  1175. X      }
  1176. X
  1177. X--- 889,895 -----
  1178. X         x = ax + (y_min-ay) * ((bx-ax) / (by-ay));
  1179. X         if (inrange(x, x_min, x_max)) {
  1180. X            *lx++ = x;
  1181. X!           *ly++ = y_min;
  1182. X            intersect = TRUE;
  1183. X         }
  1184. X      }
  1185. X***************
  1186. X*** 893,902
  1187. X         }
  1188. X      }
  1189. X      
  1190. X!     /* does it intersect ymax edge */
  1191. X!     if (inrange(ymax, ay, by)) {
  1192. X!        x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
  1193. X!        if (inrange(x, xmin, xmax)) {
  1194. X            *lx++ = x;
  1195. X            *ly++ = ymax;
  1196. X            intersect = TRUE;
  1197. X
  1198. X--- 894,903 -----
  1199. X         }
  1200. X      }
  1201. X      
  1202. X!     /* does it intersect y_max edge */
  1203. X!     if (inrange(y_max, ay, by)) {
  1204. X!        x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
  1205. X!        if (inrange(x, x_min, x_max)) {
  1206. X            *lx++ = x;
  1207. X            *ly++ = y_max;
  1208. X            intersect = TRUE;
  1209. X***************
  1210. X*** 898,904
  1211. X         x = ax + (ymax-ay) * ((bx-ax) / (by-ay));
  1212. X         if (inrange(x, xmin, xmax)) {
  1213. X            *lx++ = x;
  1214. X!           *ly++ = ymax;
  1215. X            intersect = TRUE;
  1216. X         }
  1217. X      }
  1218. X
  1219. X--- 899,905 -----
  1220. X         x = ax + (y_max-ay) * ((bx-ax) / (by-ay));
  1221. X         if (inrange(x, x_min, x_max)) {
  1222. X            *lx++ = x;
  1223. X!           *ly++ = y_max;
  1224. X            intersect = TRUE;
  1225. X         }
  1226. X      }
  1227. X***************
  1228. X*** 903,913
  1229. X         }
  1230. X      }
  1231. X  
  1232. X!     /* does it intersect xmin edge */
  1233. X!     if (inrange(xmin, ax, bx)) {
  1234. X!        y = ay + (xmin-ax) * ((by-ay) / (bx-ax));
  1235. X!        if (inrange(y, ymin, ymax)) {
  1236. X!           *lx++ = xmin;
  1237. X            *ly++ = y;
  1238. X            intersect = TRUE;
  1239. X         }
  1240. X
  1241. X--- 904,914 -----
  1242. X         }
  1243. X      }
  1244. X  
  1245. X!     /* does it intersect x_min edge */
  1246. X!     if (inrange(x_min, ax, bx)) {
  1247. X!        y = ay + (x_min-ax) * ((by-ay) / (bx-ax));
  1248. X!        if (inrange(y, y_min, y_max)) {
  1249. X!           *lx++ = x_min;
  1250. X            *ly++ = y;
  1251. X            intersect = TRUE;
  1252. X         }
  1253. X***************
  1254. X*** 913,923
  1255. X         }
  1256. X      }
  1257. X  
  1258. X!     /* does it intersect xmax edge */
  1259. X!     if (inrange(xmax, ax, bx)) {
  1260. X!        y = ay + (xmax-ax) * ((by-ay) / (bx-ax));
  1261. X!        if (inrange(y, ymin, ymax)) {
  1262. X!           *lx++ = xmax;
  1263. X            *ly++ = y;
  1264. X            intersect = TRUE;
  1265. X         }
  1266. X
  1267. X--- 914,924 -----
  1268. X         }
  1269. X      }
  1270. X  
  1271. X!     /* does it intersect x_max edge */
  1272. X!     if (inrange(x_max, ax, bx)) {
  1273. X!        y = ay + (x_max-ax) * ((by-ay) / (bx-ax));
  1274. X!        if (inrange(y, y_min, y_max)) {
  1275. X!           *lx++ = x_max;
  1276. X            *ly++ = y;
  1277. X            intersect = TRUE;
  1278. X         }
  1279. X***************
  1280. X*** 935,942
  1281. X      */
  1282. X      if (ax == -VERYLARGE) {
  1283. X         if (ay != -VERYLARGE
  1284. X!           && inrange(by, ymin, ymax) && inrange(xmax, ax, bx)) {
  1285. X!           *lx++ = xmin;
  1286. X            *ly = by;
  1287. X            *lx++ = xmax;
  1288. X            *ly = by;
  1289. X
  1290. X--- 936,943 -----
  1291. X      */
  1292. X      if (ax == -VERYLARGE) {
  1293. X         if (ay != -VERYLARGE
  1294. X!           && inrange(by, y_min, y_max) && inrange(x_max, ax, bx)) {
  1295. X!           *lx++ = x_min;
  1296. X            *ly = by;
  1297. X            *lx++ = x_max;
  1298. X            *ly = by;
  1299. X***************
  1300. X*** 938,944
  1301. X            && inrange(by, ymin, ymax) && inrange(xmax, ax, bx)) {
  1302. X            *lx++ = xmin;
  1303. X            *ly = by;
  1304. X!           *lx++ = xmax;
  1305. X            *ly = by;
  1306. X            intersect = TRUE;
  1307. X         }
  1308. X
  1309. X--- 939,945 -----
  1310. X            && inrange(by, y_min, y_max) && inrange(x_max, ax, bx)) {
  1311. X            *lx++ = x_min;
  1312. X            *ly = by;
  1313. X!           *lx++ = x_max;
  1314. X            *ly = by;
  1315. X            intersect = TRUE;
  1316. X         }
  1317. X***************
  1318. X*** 944,951
  1319. X         }
  1320. X      } else if (bx == -VERYLARGE) {
  1321. X         if (by != -VERYLARGE
  1322. X!           && inrange(ay, ymin, ymax) && inrange(xmax, ax, bx)) {
  1323. X!           *lx++ = xmin;
  1324. X            *ly = ay;
  1325. X            *lx++ = xmax;
  1326. X            *ly = ay;
  1327. X
  1328. X--- 945,952 -----
  1329. X         }
  1330. X      } else if (bx == -VERYLARGE) {
  1331. X         if (by != -VERYLARGE
  1332. X!           && inrange(ay, y_min, y_max) && inrange(x_max, ax, bx)) {
  1333. X!           *lx++ = x_min;
  1334. X            *ly = ay;
  1335. X            *lx++ = x_max;
  1336. X            *ly = ay;
  1337. X***************
  1338. X*** 947,953
  1339. X            && inrange(ay, ymin, ymax) && inrange(xmax, ax, bx)) {
  1340. X            *lx++ = xmin;
  1341. X            *ly = ay;
  1342. X!           *lx++ = xmax;
  1343. X            *ly = ay;
  1344. X            intersect = TRUE;
  1345. X         }
  1346. X
  1347. X--- 948,954 -----
  1348. X            && inrange(ay, y_min, y_max) && inrange(x_max, ax, bx)) {
  1349. X            *lx++ = x_min;
  1350. X            *ly = ay;
  1351. X!           *lx++ = x_max;
  1352. X            *ly = ay;
  1353. X            intersect = TRUE;
  1354. X         }
  1355. X***************
  1356. X*** 953,959
  1357. X         }
  1358. X      } else if (ay == -VERYLARGE) {
  1359. X         /* note we know ax != -VERYLARGE */
  1360. X!        if (inrange(bx, xmin, xmax) && inrange(ymax, ay, by)) {
  1361. X            *lx++ = bx;
  1362. X            *ly = ymin;
  1363. X            *lx++ = bx;
  1364. X
  1365. X--- 954,960 -----
  1366. X         }
  1367. X      } else if (ay == -VERYLARGE) {
  1368. X         /* note we know ax != -VERYLARGE */
  1369. X!        if (inrange(bx, x_min, x_max) && inrange(y_max, ay, by)) {
  1370. X            *lx++ = bx;
  1371. X            *ly = y_min;
  1372. X            *lx++ = bx;
  1373. X***************
  1374. X*** 955,961
  1375. X         /* note we know ax != -VERYLARGE */
  1376. X         if (inrange(bx, xmin, xmax) && inrange(ymax, ay, by)) {
  1377. X            *lx++ = bx;
  1378. X!           *ly = ymin;
  1379. X            *lx++ = bx;
  1380. X            *ly = ymax;
  1381. X            intersect = TRUE;
  1382. X
  1383. X--- 956,962 -----
  1384. X         /* note we know ax != -VERYLARGE */
  1385. X         if (inrange(bx, x_min, x_max) && inrange(y_max, ay, by)) {
  1386. X            *lx++ = bx;
  1387. X!           *ly = y_min;
  1388. X            *lx++ = bx;
  1389. X            *ly = y_max;
  1390. X            intersect = TRUE;
  1391. X***************
  1392. X*** 957,963
  1393. X            *lx++ = bx;
  1394. X            *ly = ymin;
  1395. X            *lx++ = bx;
  1396. X!           *ly = ymax;
  1397. X            intersect = TRUE;
  1398. X         }
  1399. X      } else if (by == -VERYLARGE) {
  1400. X
  1401. X--- 958,964 -----
  1402. X            *lx++ = bx;
  1403. X            *ly = y_min;
  1404. X            *lx++ = bx;
  1405. X!           *ly = y_max;
  1406. X            intersect = TRUE;
  1407. X         }
  1408. X      } else if (by == -VERYLARGE) {
  1409. X***************
  1410. X*** 962,968
  1411. X         }
  1412. X      } else if (by == -VERYLARGE) {
  1413. X         /* note we know bx != -VERYLARGE */
  1414. X!        if (inrange(ax, xmin, xmax) && inrange(ymax, ay, by)) {
  1415. X            *lx++ = ax;
  1416. X            *ly = ymin;
  1417. X            *lx++ = ax;
  1418. X
  1419. X--- 963,969 -----
  1420. X         }
  1421. X      } else if (by == -VERYLARGE) {
  1422. X         /* note we know bx != -VERYLARGE */
  1423. X!        if (inrange(ax, x_min, x_max) && inrange(y_max, ay, by)) {
  1424. X            *lx++ = ax;
  1425. X            *ly = y_min;
  1426. X            *lx++ = ax;
  1427. X***************
  1428. X*** 964,970
  1429. X         /* note we know bx != -VERYLARGE */
  1430. X         if (inrange(ax, xmin, xmax) && inrange(ymax, ay, by)) {
  1431. X            *lx++ = ax;
  1432. X!           *ly = ymin;
  1433. X            *lx++ = ax;
  1434. X            *ly = ymax;
  1435. X            intersect = TRUE;
  1436. X
  1437. X--- 965,971 -----
  1438. X         /* note we know bx != -VERYLARGE */
  1439. X         if (inrange(ax, x_min, x_max) && inrange(y_max, ay, by)) {
  1440. X            *lx++ = ax;
  1441. X!           *ly = y_min;
  1442. X            *lx++ = ax;
  1443. X            *ly = y_max;
  1444. X            intersect = TRUE;
  1445. X***************
  1446. X*** 966,972
  1447. X            *lx++ = ax;
  1448. X            *ly = ymin;
  1449. X            *lx++ = ax;
  1450. X!           *ly = ymax;
  1451. X            intersect = TRUE;
  1452. X         }
  1453. X      }
  1454. X
  1455. X--- 967,973 -----
  1456. X            *lx++ = ax;
  1457. X            *ly = y_min;
  1458. X            *lx++ = ax;
  1459. X!           *ly = y_max;
  1460. X            intersect = TRUE;
  1461. X         }
  1462. X      }
  1463. X***************
  1464. X*** 993,1002
  1465. X      If not autoscaling, use the yrange for both x and y ranges.
  1466. X  */
  1467. X      if (autoscale_ly) {
  1468. X!         xmin = VERYLARGE;
  1469. X!         ymin = VERYLARGE;
  1470. X!         xmax = -VERYLARGE;
  1471. X!         ymax = -VERYLARGE;
  1472. X          autoscale_lx = TRUE;
  1473. X      } else {
  1474. X          xmin = ymin;
  1475. X
  1476. X--- 994,1003 -----
  1477. X      If not autoscaling, use the yrange for both x and y ranges.
  1478. X  */
  1479. X      if (autoscale_ly) {
  1480. X!         x_min = VERYLARGE;
  1481. X!         y_min = VERYLARGE;
  1482. X!         x_max = -VERYLARGE;
  1483. X!         y_max = -VERYLARGE;
  1484. X          autoscale_lx = TRUE;
  1485. X      } else {
  1486. X          x_min = y_min;
  1487. X***************
  1488. X*** 999,1006
  1489. X          ymax = -VERYLARGE;
  1490. X          autoscale_lx = TRUE;
  1491. X      } else {
  1492. X!         xmin = ymin;
  1493. X!         xmax = ymax;
  1494. X      }
  1495. X      
  1496. X      this_plot = plots;
  1497. X
  1498. X--- 1000,1007 -----
  1499. X          y_max = -VERYLARGE;
  1500. X          autoscale_lx = TRUE;
  1501. X      } else {
  1502. X!         x_min = y_min;
  1503. X!         x_max = y_max;
  1504. X      }
  1505. X      
  1506. X      this_plot = plots;
  1507. X***************
  1508. X*** 1017,1026
  1509. X                  pnts[i].x = x;
  1510. X                  pnts[i].y = y;
  1511. X                  if (autoscale_ly) {
  1512. X!                     if (xmin > x) xmin = x;
  1513. X!                     if (xmax < x) xmax = x;
  1514. X!                     if (ymin > y) ymin = y;
  1515. X!                     if (ymax < y) ymax = y;
  1516. X                      pnts[i].type = INRANGE;
  1517. X                  } else if(inrange(x, xmin, xmax) && inrange(y, ymin, ymax))
  1518. X                    pnts[i].type = INRANGE;
  1519. X
  1520. X--- 1018,1027 -----
  1521. X                  pnts[i].x = x;
  1522. X                  pnts[i].y = y;
  1523. X                  if (autoscale_ly) {
  1524. X!                     if (x_min > x) x_min = x;
  1525. X!                     if (x_max < x) x_max = x;
  1526. X!                     if (y_min > y) y_min = y;
  1527. X!                     if (y_max < y) y_max = y;
  1528. X                      pnts[i].type = INRANGE;
  1529. X                  } else if(inrange(x, x_min, x_max) && inrange(y, y_min, y_max))
  1530. X                    pnts[i].type = INRANGE;
  1531. X***************
  1532. X*** 1022,1028
  1533. X                      if (ymin > y) ymin = y;
  1534. X                      if (ymax < y) ymax = y;
  1535. X                      pnts[i].type = INRANGE;
  1536. X!                 } else if(inrange(x, xmin, xmax) && inrange(y, ymin, ymax))
  1537. X                    pnts[i].type = INRANGE;
  1538. X                  else
  1539. X                    pnts[i].type = OUTRANGE;
  1540. X
  1541. X--- 1023,1029 -----
  1542. X                      if (y_min > y) y_min = y;
  1543. X                      if (y_max < y) y_max = y;
  1544. X                      pnts[i].type = INRANGE;
  1545. X!                 } else if(inrange(x, x_min, x_max) && inrange(y, y_min, y_max))
  1546. X                    pnts[i].type = INRANGE;
  1547. X                  else
  1548. X                    pnts[i].type = OUTRANGE;
  1549. X***************
  1550. X*** 1030,1036
  1551. X          }    
  1552. X      }
  1553. X  
  1554. X!     if (autoscale_lx && anydefined && fabs(xmax - xmin) < zero) {
  1555. X          /* This happens at least for the plot of 1/cos(x) (vertical line). */
  1556. X          fprintf(stderr, "Warning: empty x range [%g:%g], ", xmin,xmax);
  1557. X          if (xmin == 0.0) {
  1558. X
  1559. X--- 1031,1037 -----
  1560. X          }    
  1561. X      }
  1562. X  
  1563. X!     if (autoscale_lx && anydefined && fabs(x_max - x_min) < zero) {
  1564. X          /* This happens at least for the plot of 1/cos(x) (vertical line). */
  1565. X          fprintf(stderr, "Warning: empty x range [%g:%g], ", x_min,x_max);
  1566. X          if (x_min == 0.0) {
  1567. X***************
  1568. X*** 1032,1041
  1569. X  
  1570. X      if (autoscale_lx && anydefined && fabs(xmax - xmin) < zero) {
  1571. X          /* This happens at least for the plot of 1/cos(x) (vertical line). */
  1572. X!         fprintf(stderr, "Warning: empty x range [%g:%g], ", xmin,xmax);
  1573. X!         if (xmin == 0.0) {
  1574. X!            xmin = -1; 
  1575. X!            xmax = 1;
  1576. X          } else {
  1577. X             xmin *= 0.9;
  1578. X             xmax *= 1.1;
  1579. X
  1580. X--- 1033,1042 -----
  1581. X  
  1582. X      if (autoscale_lx && anydefined && fabs(x_max - x_min) < zero) {
  1583. X          /* This happens at least for the plot of 1/cos(x) (vertical line). */
  1584. X!         fprintf(stderr, "Warning: empty x range [%g:%g], ", x_min,x_max);
  1585. X!         if (x_min == 0.0) {
  1586. X!            x_min = -1; 
  1587. X!            x_max = 1;
  1588. X          } else {
  1589. X             x_min *= 0.9;
  1590. X             x_max *= 1.1;
  1591. X***************
  1592. X*** 1037,1044
  1593. X             xmin = -1; 
  1594. X             xmax = 1;
  1595. X          } else {
  1596. X!            xmin *= 0.9;
  1597. X!            xmax *= 1.1;
  1598. X          }
  1599. X          fprintf(stderr, "adjusting to [%g:%g]\n", xmin,xmax);
  1600. X      }
  1601. X
  1602. X--- 1038,1045 -----
  1603. X             x_min = -1; 
  1604. X             x_max = 1;
  1605. X          } else {
  1606. X!            x_min *= 0.9;
  1607. X!            x_max *= 1.1;
  1608. X          }
  1609. X          fprintf(stderr, "adjusting to [%g:%g]\n", x_min,x_max);
  1610. X      }
  1611. X***************
  1612. X*** 1040,1046
  1613. X             xmin *= 0.9;
  1614. X             xmax *= 1.1;
  1615. X          }
  1616. X!         fprintf(stderr, "adjusting to [%g:%g]\n", xmin,xmax);
  1617. X      }
  1618. X      if (autoscale_ly && anydefined && fabs(ymax - ymin) < zero) {
  1619. X          /* This happens at least for the plot of 1/sin(x) (horiz. line). */
  1620. X
  1621. X--- 1041,1047 -----
  1622. X             x_min *= 0.9;
  1623. X             x_max *= 1.1;
  1624. X          }
  1625. X!         fprintf(stderr, "adjusting to [%g:%g]\n", x_min,x_max);
  1626. X      }
  1627. X      if (autoscale_ly && anydefined && fabs(y_max - y_min) < zero) {
  1628. X          /* This happens at least for the plot of 1/sin(x) (horiz. line). */
  1629. X***************
  1630. X*** 1042,1048
  1631. X          }
  1632. X          fprintf(stderr, "adjusting to [%g:%g]\n", xmin,xmax);
  1633. X      }
  1634. X!     if (autoscale_ly && anydefined && fabs(ymax - ymin) < zero) {
  1635. X          /* This happens at least for the plot of 1/sin(x) (horiz. line). */
  1636. X          fprintf(stderr, "Warning: empty y range [%g:%g], ", ymin, ymax);
  1637. X          if (ymin == 0.0) {
  1638. X
  1639. X--- 1043,1049 -----
  1640. X          }
  1641. X          fprintf(stderr, "adjusting to [%g:%g]\n", x_min,x_max);
  1642. X      }
  1643. X!     if (autoscale_ly && anydefined && fabs(y_max - y_min) < zero) {
  1644. X          /* This happens at least for the plot of 1/sin(x) (horiz. line). */
  1645. X          fprintf(stderr, "Warning: empty y range [%g:%g], ", y_min, y_max);
  1646. X          if (y_min == 0.0) {
  1647. X***************
  1648. X*** 1044,1053
  1649. X      }
  1650. X      if (autoscale_ly && anydefined && fabs(ymax - ymin) < zero) {
  1651. X          /* This happens at least for the plot of 1/sin(x) (horiz. line). */
  1652. X!         fprintf(stderr, "Warning: empty y range [%g:%g], ", ymin, ymax);
  1653. X!         if (ymin == 0.0) {
  1654. X!            ymin = -1;
  1655. X!            ymax = 1;
  1656. X          } else {
  1657. X             ymin *= 0.9;
  1658. X             ymax *= 1.1;
  1659. X
  1660. X--- 1045,1054 -----
  1661. X      }
  1662. X      if (autoscale_ly && anydefined && fabs(y_max - y_min) < zero) {
  1663. X          /* This happens at least for the plot of 1/sin(x) (horiz. line). */
  1664. X!         fprintf(stderr, "Warning: empty y range [%g:%g], ", y_min, y_max);
  1665. X!         if (y_min == 0.0) {
  1666. X!            y_min = -1;
  1667. X!            y_max = 1;
  1668. X          } else {
  1669. X             y_min *= 0.9;
  1670. X             y_max *= 1.1;
  1671. X***************
  1672. X*** 1049,1056
  1673. X             ymin = -1;
  1674. X             ymax = 1;
  1675. X          } else {
  1676. X!            ymin *= 0.9;
  1677. X!            ymax *= 1.1;
  1678. X          }
  1679. X          fprintf(stderr, "adjusting to [%g:%g]\n", ymin, ymax);
  1680. X      }
  1681. X
  1682. X--- 1050,1057 -----
  1683. X             y_min = -1;
  1684. X             y_max = 1;
  1685. X          } else {
  1686. X!            y_min *= 0.9;
  1687. X!            y_max *= 1.1;
  1688. X          }
  1689. X          fprintf(stderr, "adjusting to [%g:%g]\n", y_min, y_max);
  1690. X      }
  1691. X***************
  1692. X*** 1052,1058
  1693. X             ymin *= 0.9;
  1694. X             ymax *= 1.1;
  1695. X          }
  1696. X!         fprintf(stderr, "adjusting to [%g:%g]\n", ymin, ymax);
  1697. X      }
  1698. X  }
  1699. X  
  1700. X
  1701. X--- 1053,1059 -----
  1702. X             y_min *= 0.9;
  1703. X             y_max *= 1.1;
  1704. X          }
  1705. X!         fprintf(stderr, "adjusting to [%g:%g]\n", y_min, y_max);
  1706. X      }
  1707. X  }
  1708. X  
  1709. X***************
  1710. X*** 1067,1073
  1711. X      double ticmin, ticmax;    /* for checking if tic is almost inrange */
  1712. X  
  1713. X      if (end == VERYLARGE)            /* for user-def series */
  1714. X!         end = max(ymin,ymax);
  1715. X  
  1716. X      /* limit to right side of plot */
  1717. X      end = min(end, max(ymin,ymax));
  1718. X
  1719. X--- 1068,1074 -----
  1720. X      double ticmin, ticmax;    /* for checking if tic is almost inrange */
  1721. X  
  1722. X      if (end == VERYLARGE)            /* for user-def series */
  1723. X!         end = max(y_min,y_max);
  1724. X  
  1725. X      /* limit to right side of plot */
  1726. X      end = min(end, max(y_min,y_max));
  1727. X***************
  1728. X*** 1070,1076
  1729. X          end = max(ymin,ymax);
  1730. X  
  1731. X      /* limit to right side of plot */
  1732. X!     end = min(end, max(ymin,ymax));
  1733. X  
  1734. X      /* to allow for rounding errors */
  1735. X      ticmin = min(ymin,ymax) - SIGNIF*incr;
  1736. X
  1737. X--- 1071,1077 -----
  1738. X          end = max(y_min,y_max);
  1739. X  
  1740. X      /* limit to right side of plot */
  1741. X!     end = min(end, max(y_min,y_max));
  1742. X  
  1743. X      /* to allow for rounding errors */
  1744. X      ticmin = min(y_min,y_max) - SIGNIF*incr;
  1745. X***************
  1746. X*** 1073,1080
  1747. X      end = min(end, max(ymin,ymax));
  1748. X  
  1749. X      /* to allow for rounding errors */
  1750. X!     ticmin = min(ymin,ymax) - SIGNIF*incr;
  1751. X!     ticmax = max(ymin,ymax) + SIGNIF*incr;
  1752. X      end = end + SIGNIF*incr; 
  1753. X  
  1754. X      for (ticplace = start; ticplace <= end; ticplace +=incr) {
  1755. X
  1756. X--- 1074,1081 -----
  1757. X      end = min(end, max(y_min,y_max));
  1758. X  
  1759. X      /* to allow for rounding errors */
  1760. X!     ticmin = min(y_min,y_max) - SIGNIF*incr;
  1761. X!     ticmax = max(y_min,y_max) + SIGNIF*incr;
  1762. X      end = end + SIGNIF*incr; 
  1763. X  
  1764. X      for (ticplace = start; ticplace <= end; ticplace +=incr) {
  1765. X***************
  1766. X*** 1085,1091
  1767. X              for (ltic = 2; ltic <= 9; ltic++) {
  1768. X                  lticplace = ticplace+log10((double)ltic);
  1769. X                  if ( inrange(lticplace,ticmin,ticmax) )
  1770. X!                     ytick(lticplace, (char *)NULL, incr, 0.5);
  1771. X              }
  1772. X          }
  1773. X      }
  1774. X
  1775. X--- 1086,1092 -----
  1776. X              for (ltic = 2; ltic <= 9; ltic++) {
  1777. X                  lticplace = ticplace+log10((double)ltic);
  1778. X                  if ( inrange(lticplace,ticmin,ticmax) )
  1779. X!                     ytick(lticplace, "\0", incr, 0.5);
  1780. X              }
  1781. X          }
  1782. X      }
  1783. X***************
  1784. X*** 1091,1097
  1785. X      }
  1786. X  }
  1787. X  
  1788. X- 
  1789. X  /* DRAW_XTICS: draw a regular tic series, x axis */
  1790. X  draw_xtics(start, incr, end)
  1791. X          double start, incr, end; /* tic series definition */
  1792. X
  1793. X--- 1092,1097 -----
  1794. X      }
  1795. X  }
  1796. X  
  1797. X  /* DRAW_XTICS: draw a regular tic series, x axis */
  1798. X  draw_xtics(start, incr, end)
  1799. X          double start, incr, end; /* tic series definition */
  1800. X***************
  1801. X*** 1103,1109
  1802. X      double ticmin, ticmax;    /* for checking if tic is almost inrange */
  1803. X  
  1804. X      if (end == VERYLARGE)            /* for user-def series */
  1805. X!         end = max(xmin,xmax);
  1806. X  
  1807. X      /* limit to right side of plot */
  1808. X      end = min(end, max(xmin,xmax));
  1809. X
  1810. X--- 1103,1109 -----
  1811. X      double ticmin, ticmax;    /* for checking if tic is almost inrange */
  1812. X  
  1813. X      if (end == VERYLARGE)            /* for user-def series */
  1814. X!         end = max(x_min,x_max);
  1815. X  
  1816. X      /* limit to right side of plot */
  1817. X      end = min(end, max(x_min,x_max));
  1818. X***************
  1819. X*** 1106,1112
  1820. X          end = max(xmin,xmax);
  1821. X  
  1822. X      /* limit to right side of plot */
  1823. X!     end = min(end, max(xmin,xmax));
  1824. X  
  1825. X      /* to allow for rounding errors */
  1826. X      ticmin = min(xmin,xmax) - SIGNIF*incr;
  1827. X
  1828. X--- 1106,1112 -----
  1829. X          end = max(x_min,x_max);
  1830. X  
  1831. X      /* limit to right side of plot */
  1832. X!     end = min(end, max(x_min,x_max));
  1833. X  
  1834. X      /* to allow for rounding errors */
  1835. X      ticmin = min(x_min,x_max) - SIGNIF*incr;
  1836. X***************
  1837. X*** 1109,1116
  1838. X      end = min(end, max(xmin,xmax));
  1839. X  
  1840. X      /* to allow for rounding errors */
  1841. X!     ticmin = min(xmin,xmax) - SIGNIF*incr;
  1842. X!     ticmax = max(xmin,xmax) + SIGNIF*incr;
  1843. X      end = end + SIGNIF*incr; 
  1844. X  
  1845. X      for (ticplace = start; ticplace <= end; ticplace +=incr) {
  1846. X
  1847. X--- 1109,1116 -----
  1848. X      end = min(end, max(x_min,x_max));
  1849. X  
  1850. X      /* to allow for rounding errors */
  1851. X!     ticmin = min(x_min,x_max) - SIGNIF*incr;
  1852. X!     ticmax = max(x_min,x_max) + SIGNIF*incr;
  1853. X      end = end + SIGNIF*incr; 
  1854. X  
  1855. X      for (ticplace = start; ticplace <= end; ticplace +=incr) {
  1856. X***************
  1857. X*** 1121,1127
  1858. X              for (ltic = 2; ltic <= 9; ltic++) {
  1859. X                  lticplace = ticplace+log10((double)ltic);
  1860. X                  if ( inrange(lticplace,ticmin,ticmax) )
  1861. X!                     xtick(lticplace, (char *)NULL, incr, 0.5);
  1862. X              }
  1863. X          }
  1864. X      }
  1865. X
  1866. X--- 1121,1127 -----
  1867. X              for (ltic = 2; ltic <= 9; ltic++) {
  1868. X                  lticplace = ticplace+log10((double)ltic);
  1869. X                  if ( inrange(lticplace,ticmin,ticmax) )
  1870. X!                     xtick(lticplace, "\0", incr, 0.5);
  1871. X              }
  1872. X          }
  1873. X      }
  1874. X***************
  1875. X*** 1127,1134
  1876. X      }
  1877. X  }
  1878. X  
  1879. X! /* DRAW_USER_YTICS: draw a user tic series, y axis */
  1880. X! draw_user_ytics(list)
  1881. X      struct ticmark *list;    /* list of tic marks */
  1882. X  {
  1883. X      double ticplace;
  1884. X
  1885. X--- 1127,1189 -----
  1886. X      }
  1887. X  }
  1888. X  
  1889. X! /* DRAW_SERIES_YTICS: draw a user tic series, y axis */
  1890. X! draw_series_ytics(start, incr, end)
  1891. X!         double start, incr, end; /* tic series definition */
  1892. X!         /* assume start < end, incr > 0 */
  1893. X! {
  1894. X!     double ticplace, place;
  1895. X!     double ticmin, ticmax;    /* for checking if tic is almost inrange */
  1896. X!     double spacing = log_y ? log10(incr) : incr;
  1897. X! 
  1898. X!     if (end == VERYLARGE)
  1899. X!         end = max(CheckLog(log_y, y_min), CheckLog(log_y, y_max));
  1900. X!     else
  1901. X!       /* limit to right side of plot */
  1902. X!       end = min(end, max(CheckLog(log_y, y_min), CheckLog(log_y, y_max)));
  1903. X! 
  1904. X!     /* to allow for rounding errors */
  1905. X!     ticmin = min(y_min,y_max) - SIGNIF*incr;
  1906. X!     ticmax = max(y_min,y_max) + SIGNIF*incr;
  1907. X!     end = end + SIGNIF*incr; 
  1908. X! 
  1909. X!     for (ticplace = start; ticplace <= end; ticplace +=incr) {
  1910. X!         place = (log_y ? log10(ticplace) : ticplace);
  1911. X!         if ( inrange(place,ticmin,ticmax) )
  1912. X!          ytick(place, yformat, spacing, 1.0);
  1913. X!     }
  1914. X! }
  1915. X! 
  1916. X! 
  1917. X! /* DRAW_SERIES_XTICS: draw a user tic series, x axis */
  1918. X! draw_series_xtics(start, incr, end)
  1919. X!         double start, incr, end; /* tic series definition */
  1920. X!         /* assume start < end, incr > 0 */
  1921. X! {
  1922. X!     double ticplace, place;
  1923. X!     double ticmin, ticmax;    /* for checking if tic is almost inrange */
  1924. X!     double spacing = log_x ? log10(incr) : incr;
  1925. X! 
  1926. X!     if (end == VERYLARGE)
  1927. X!         end = max(CheckLog(log_x, x_min), CheckLog(log_x, x_max));
  1928. X!     else
  1929. X!       /* limit to right side of plot */
  1930. X!       end = min(end, max(CheckLog(log_x, x_min), CheckLog(log_x, x_max)));
  1931. X! 
  1932. X!     /* to allow for rounding errors */
  1933. X!     ticmin = min(x_min,x_max) - SIGNIF*incr;
  1934. X!     ticmax = max(x_min,x_max) + SIGNIF*incr;
  1935. X!     end = end + SIGNIF*incr; 
  1936. X! 
  1937. X!     for (ticplace = start; ticplace <= end; ticplace +=incr) {
  1938. X!         place = (log_x ? log10(ticplace) : ticplace);
  1939. X!         if ( inrange(place,ticmin,ticmax) )
  1940. X!          xtick(place, xformat, spacing, 1.0);
  1941. X!     }
  1942. X! }
  1943. X! 
  1944. X! /* DRAW_SET_YTICS: draw a user tic set, y axis */
  1945. X! draw_set_ytics(list)
  1946. X      struct ticmark *list;    /* list of tic marks */
  1947. X  {
  1948. X      double ticplace;
  1949. X***************
  1950. X*** 1132,1139
  1951. X      struct ticmark *list;    /* list of tic marks */
  1952. X  {
  1953. X      double ticplace;
  1954. X!     double incr = (ymax - ymin) / 10;
  1955. X!     /* global xmin, xmax, xscale, ymin, ymax, yscale */
  1956. X  
  1957. X      while (list != NULL) {
  1958. X         ticplace = list->position;
  1959. X
  1960. X--- 1187,1194 -----
  1961. X      struct ticmark *list;    /* list of tic marks */
  1962. X  {
  1963. X      double ticplace;
  1964. X!     double incr = (y_max - y_min) / 10;
  1965. X!     /* global x_min, x_max, xscale, y_min, y_max, yscale */
  1966. X  
  1967. X      while (list != NULL) {
  1968. X         ticplace = (log_y ? log10(list->position) : list->position);
  1969. X***************
  1970. X*** 1136,1145
  1971. X      /* global xmin, xmax, xscale, ymin, ymax, yscale */
  1972. X  
  1973. X      while (list != NULL) {
  1974. X!        ticplace = list->position;
  1975. X!        if ( inrange(ticplace, ymin, ymax)         /* in range */
  1976. X!           || NearlyEqual(ticplace, ymin, incr)    /* == ymin */
  1977. X!           || NearlyEqual(ticplace, ymax, incr))    /* == ymax */
  1978. X          ytick(ticplace, list->label, incr, 1.0);
  1979. X  
  1980. X         list = list->next;
  1981. X
  1982. X--- 1191,1200 -----
  1983. X      /* global x_min, x_max, xscale, y_min, y_max, yscale */
  1984. X  
  1985. X      while (list != NULL) {
  1986. X!        ticplace = (log_y ? log10(list->position) : list->position);
  1987. X!        if ( inrange(ticplace, y_min, y_max)         /* in range */
  1988. X!           || NearlyEqual(ticplace, y_min, incr)    /* == y_min */
  1989. X!           || NearlyEqual(ticplace, y_max, incr))    /* == y_max */
  1990. X          ytick(ticplace, list->label, incr, 1.0);
  1991. X  
  1992. X         list = list->next;
  1993. X***************
  1994. X*** 1146,1153
  1995. X      }
  1996. X  }
  1997. X  
  1998. X! /* DRAW_USER_XTICS: draw a user tic series, x axis */
  1999. X! draw_user_xtics(list)
  2000. X      struct ticmark *list;    /* list of tic marks */
  2001. X  {
  2002. X      double ticplace;
  2003. X
  2004. X--- 1201,1208 -----
  2005. X      }
  2006. X  }
  2007. X  
  2008. X! /* DRAW_SET_XTICS: draw a user tic set, x axis */
  2009. X! draw_set_xtics(list)
  2010. X      struct ticmark *list;    /* list of tic marks */
  2011. X  {
  2012. X      double ticplace;
  2013. X***************
  2014. X*** 1151,1158
  2015. X      struct ticmark *list;    /* list of tic marks */
  2016. X  {
  2017. X      double ticplace;
  2018. X!     double incr = (xmax - xmin) / 10;
  2019. X!     /* global xmin, xmax, xscale, ymin, ymax, yscale */
  2020. X  
  2021. X      while (list != NULL) {
  2022. X         ticplace = list->position;
  2023. X
  2024. X--- 1206,1213 -----
  2025. X      struct ticmark *list;    /* list of tic marks */
  2026. X  {
  2027. X      double ticplace;
  2028. X!     double incr = (x_max - x_min) / 10;
  2029. X!     /* global x_min, x_max, xscale, y_min, y_max, yscale */
  2030. X  
  2031. X      while (list != NULL) {
  2032. X         ticplace = (log_x ? log10(list->position) : list->position);
  2033. X***************
  2034. X*** 1155,1164
  2035. X      /* global xmin, xmax, xscale, ymin, ymax, yscale */
  2036. X  
  2037. X      while (list != NULL) {
  2038. X!        ticplace = list->position;
  2039. X!        if ( inrange(ticplace, xmin, xmax)         /* in range */
  2040. X!           || NearlyEqual(ticplace, xmin, incr)    /* == xmin */
  2041. X!           || NearlyEqual(ticplace, xmax, incr))    /* == xmax */
  2042. X          xtick(ticplace, list->label, incr, 1.0);
  2043. X  
  2044. X         list = list->next;
  2045. X
  2046. X--- 1210,1219 -----
  2047. X      /* global x_min, x_max, xscale, y_min, y_max, yscale */
  2048. X  
  2049. X      while (list != NULL) {
  2050. X!        ticplace = (log_x ? log10(list->position) : list->position);
  2051. X!        if ( inrange(ticplace, x_min, x_max)         /* in range */
  2052. X!           || NearlyEqual(ticplace, x_min, incr)    /* == x_min */
  2053. X!           || NearlyEqual(ticplace, x_max, incr))    /* == x_max */
  2054. X          xtick(ticplace, list->label, incr, 1.0);
  2055. X  
  2056. X         list = list->next;
  2057. X***************
  2058. X*** 1194,1209
  2059. X      }
  2060. X  
  2061. X      /* label the ticmark */
  2062. X!     if (text) {
  2063. X!         (void) sprintf(ticlabel, text, CheckLog(log_y, place));
  2064. X!         if ((*t->justify_text)(RIGHT)) {
  2065. X!            (*t->put_text)(xleft-(t->h_char),
  2066. X!                        map_y(place), ticlabel);
  2067. X!         } else {
  2068. X!            (*t->put_text)(xleft-(t->h_char)*(strlen(ticlabel)+1),
  2069. X!                        map_y(place), ticlabel);
  2070. X!         }
  2071. X!     }
  2072. X  }
  2073. X  
  2074. X  /* draw and label an x-axis ticmark */
  2075. X
  2076. X--- 1249,1265 -----
  2077. X      }
  2078. X  
  2079. X      /* label the ticmark */
  2080. X!     if (text == NULL) 
  2081. X!      text = yformat;
  2082. X!     
  2083. X!     (void) sprintf(ticlabel, text, CheckLog(log_y, place));
  2084. X!     if ((*t->justify_text)(RIGHT)) {
  2085. X!        (*t->put_text)(xleft-(t->h_char),
  2086. X!                    map_y(place), ticlabel);
  2087. X!     } else {
  2088. X!        (*t->put_text)(xleft-(t->h_char)*(strlen(ticlabel)+1),
  2089. X!                    map_y(place), ticlabel);
  2090. X!     }
  2091. X  }
  2092. X  
  2093. X  /* draw and label an x-axis ticmark */
  2094. X***************
  2095. X*** 1233,1239
  2096. X             (*t->move)(map_x(place), ybot);
  2097. X             (*t->vector)(map_x(place), ybot - ticsize);
  2098. X      }
  2099. X! 
  2100. X      /* label the ticmark */
  2101. X      if (text) {
  2102. X         (void) sprintf(ticlabel, text, CheckLog(log_x, place));
  2103. X
  2104. X--- 1289,1295 -----
  2105. X             (*t->move)(map_x(place), ybot);
  2106. X             (*t->vector)(map_x(place), ybot - ticsize);
  2107. X      }
  2108. X!     
  2109. X      /* label the ticmark */
  2110. X      if (text == NULL)
  2111. X       text = xformat;
  2112. X***************
  2113. X*** 1235,1248
  2114. X      }
  2115. X  
  2116. X      /* label the ticmark */
  2117. X!     if (text) {
  2118. X!        (void) sprintf(ticlabel, text, CheckLog(log_x, place));
  2119. X!        if ((*t->justify_text)(CENTRE)) {
  2120. X!           (*t->put_text)(map_x(place),
  2121. X!                       ybot-(t->v_char), ticlabel);
  2122. X!        } else {
  2123. X!           (*t->put_text)(map_x(place)-(t->h_char)*strlen(ticlabel)/2,
  2124. X!                       ybot-(t->v_char), ticlabel);
  2125. X!        }
  2126. X      }
  2127. X  }
  2128. X
  2129. X--- 1291,1305 -----
  2130. X      }
  2131. X      
  2132. X      /* label the ticmark */
  2133. X!     if (text == NULL)
  2134. X!      text = xformat;
  2135. X! 
  2136. X!     (void) sprintf(ticlabel, text, CheckLog(log_x, place));
  2137. X!     if ((*t->justify_text)(CENTRE)) {
  2138. X!        (*t->put_text)(map_x(place),
  2139. X!                    ybot-(t->v_char), ticlabel);
  2140. X!     } else {
  2141. X!        (*t->put_text)(map_x(place)-(t->h_char)*strlen(ticlabel)/2,
  2142. X!                    ybot-(t->v_char), ticlabel);
  2143. X      }
  2144. X  }
  2145. Xdiff -cr ./docs/gnuplot.1 ../patch/docs/gnuplot.1
  2146. X*** ./docs/gnuplot.1    Tue Mar 27 08:59:42 1990
  2147. X--- ../patch/docs/gnuplot.1    Thu Sep  6 09:59:07 1990
  2148. X***************
  2149. X*** 1,5
  2150. X  .\" dummy line
  2151. X! .TH GNUPLOT 1 "13 February 1990"
  2152. X  .UC 4
  2153. X  .SH NAME
  2154. X  gnuplot \- an interactive plotting program
  2155. X
  2156. X--- 1,5 -----
  2157. X  .\" dummy line
  2158. X! .TH GNUPLOT 1 "31 August 1990"
  2159. X  .UC 4
  2160. X  .SH NAME
  2161. X  gnuplot \- an interactive plotting program
  2162. X***************
  2163. X*** 4,10
  2164. X  .SH NAME
  2165. X  gnuplot \- an interactive plotting program
  2166. X  .SH SYNOPSIS
  2167. X! .B gnuplot  file ...
  2168. X  .br
  2169. X  .SH DESCRIPTION
  2170. X  .I Gnuplot 
  2171. X
  2172. X--- 4,11 -----
  2173. X  .SH NAME
  2174. X  gnuplot \- an interactive plotting program
  2175. X  .SH SYNOPSIS
  2176. X! .B gnuplot
  2177. X! [ X11 options ] [file ...]
  2178. X  .br
  2179. X  .SH DESCRIPTION
  2180. X  .I Gnuplot 
  2181. X***************
  2182. X*** 38,43
  2183. X  BBN BitGraph,
  2184. X  Roland DXY800A,
  2185. X  EEPIC,
  2186. X  Epson LX-800,
  2187. X  Fig, 
  2188. X  HP2623,
  2189. X
  2190. X--- 39,46 -----
  2191. X  BBN BitGraph,
  2192. X  Roland DXY800A,
  2193. X  EEPIC,
  2194. X+ EmTeX,
  2195. X+ Epson 60dpi printers,
  2196. X  Epson LX-800,
  2197. X  Fig, 
  2198. X  HP2623,
  2199. X***************
  2200. X*** 54,59
  2201. X  QMS QUIC,
  2202. X  ReGis (VT125 and VT2xx),
  2203. X  Selanar,
  2204. X  Tek 401x,
  2205. X  Vectrix 384,
  2206. X  and unixplot.  
  2207. X
  2208. X--- 57,64 -----
  2209. X  QMS QUIC,
  2210. X  ReGis (VT125 and VT2xx),
  2211. X  Selanar,
  2212. X+ Star color printer,
  2213. X+ Tandy DMP-130 printer,
  2214. X  Tek 401x,
  2215. X  Tek 410x,
  2216. X  Vectrix 384,
  2217. X***************
  2218. X*** 55,60
  2219. X  ReGis (VT125 and VT2xx),
  2220. X  Selanar,
  2221. X  Tek 401x,
  2222. X  Vectrix 384,
  2223. X  and unixplot.  
  2224. X  The PC version compiled by Microsoft C
  2225. X
  2226. X--- 60,66 -----
  2227. X  Star color printer,
  2228. X  Tandy DMP-130 printer,
  2229. X  Tek 401x,
  2230. X+ Tek 410x,
  2231. X  Vectrix 384,
  2232. X  Unix PC (ATT 3b1 or ATT 7300)
  2233. X  unixplot,  
  2234. X***************
  2235. X*** 56,62
  2236. X  Selanar,
  2237. X  Tek 401x,
  2238. X  Vectrix 384,
  2239. X! and unixplot.  
  2240. X  The PC version compiled by Microsoft C
  2241. X  supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
  2242. X  and Corona 325 graphics.  
  2243. X
  2244. X--- 62,70 -----
  2245. X  Tek 401x,
  2246. X  Tek 410x,
  2247. X  Vectrix 384,
  2248. X! Unix PC (ATT 3b1 or ATT 7300)
  2249. X! unixplot,  
  2250. X! and X11.
  2251. X  The PC version compiled by Microsoft C
  2252. X  supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
  2253. X  and Corona 325 graphics.  
  2254. X***************
  2255. X*** 61,67
  2256. X  supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
  2257. X  and Corona 325 graphics.  
  2258. X  The PC version compiled by Turbo C
  2259. X! supports IBM CGA, EGA, MCGA, VGA and Hercules graphics.  
  2260. X  Other devices can be added simply, but will require recompiling.
  2261. X  .PP
  2262. X  Shell escapes and command line substitution.
  2263. X
  2264. X--- 69,75 -----
  2265. X  supports IBM CGA, EGA, VGA, Hercules, ATT 6300,
  2266. X  and Corona 325 graphics.  
  2267. X  The PC version compiled by Turbo C
  2268. X! supports IBM CGA, EGA, MCGA, VGA, Hercules and ATT 6300 graphics.  
  2269. X  Other devices can be added simply, but will require recompiling.
  2270. X  .PP
  2271. X  Shell escapes and command line substitution.
  2272. X***************
  2273. X*** 73,78
  2274. X  All computations performed in the complex domain.  Just the real part is
  2275. X  plotted by default, but functions like imag() and abs() and arg() are
  2276. X  available to override this.
  2277. X  .SH AUTHORS
  2278. X  Thomas Williams, Pixar Corporation, 
  2279. X  .br
  2280. X
  2281. X--- 81,123 -----
  2282. X  All computations performed in the complex domain.  Just the real part is
  2283. X  plotted by default, but functions like imag() and abs() and arg() are
  2284. X  available to override this.
  2285. X+ .SH X11 OPTIONS
  2286. X+ .I Gnuplot 
  2287. X+ provides two terminal types (\fIx11\fP and \fIX11\fP) for use
  2288. X+ with X servers. The \fIX11\fP terminal type provides differing colors as well 
  2289. X+ as shapes for the \fIpoints\fP plotting style. The two types are otherwise 
  2290. X+ identical.  When used with either of these terminal types, \fIgnuplot\fP
  2291. X+ honors all the standard X Toolkit options and resources such as geometry, font,
  2292. X+ foreground and background. See the X(1) man page for a description of
  2293. X+ the options. For color or grayscale displays \fIgnuplot\fP also honors 
  2294. X+ the following resources (shown here with default values):
  2295. X+ .sp
  2296. X+ .B  "gnuplot*textColor: black"
  2297. X+ .br 
  2298. X+ .B  "gnuplot*borderColor: black"
  2299. X+ .br 
  2300. X+ .B  "gnuplot*axisColor: black"
  2301. X+ .br 
  2302. X+ .B  "gnuplot*line1Color: red"
  2303. X+ .br 
  2304. X+ .B  "gnuplot*line2Color: green"
  2305. X+ .br 
  2306. X+ .B  "gnuplot*line3Color: blue"
  2307. X+ .br 
  2308. X+ .B  "gnuplot*line4Color: magenta"
  2309. X+ .br 
  2310. X+ .B  "gnuplot*line5Color: cyan"
  2311. X+ .br 
  2312. X+ .B  "gnuplot*line6Color: sienna"
  2313. X+ .br 
  2314. X+ .B  "gnuplot*line7Color: orange"
  2315. X+ .br 
  2316. X+ .B  "gnuplot*line8Color: coral"
  2317. X+ .br 
  2318. X+ .PP
  2319. X+ The size or aspect ratio of a plot may be changed by resizing the
  2320. X+ .I gnuplot
  2321. X+ window.
  2322. X  .SH AUTHORS
  2323. X  Thomas Williams, Pixar Corporation, 
  2324. X  .br
  2325. X***************
  2326. X*** 87,92
  2327. X  Further additions by David Kotz, Duke University, North Carolina, USA. 
  2328. X  .br
  2329. X  (dfk@cs.duke.edu)
  2330. X  .SH BUGS
  2331. X  The atan() function does not work correctly for complex arguments.
  2332. X  .br
  2333. X
  2334. X--- 132,139 -----
  2335. X  Further additions by David Kotz, Duke University, North Carolina, USA. 
  2336. X  .br
  2337. X  (dfk@cs.duke.edu)
  2338. X+ .br
  2339. X+ X11 support by Ed Kubaitis, University of Illinois, USA.
  2340. X  .SH BUGS
  2341. X  The atan() function does not work correctly for complex arguments.
  2342. X  .br
  2343. X***************
  2344. X*** 90,95
  2345. X  .SH BUGS
  2346. X  The atan() function does not work correctly for complex arguments.
  2347. X  .br
  2348. X  See the 
  2349. X  .I help bugs
  2350. X  command in gnuplot.
  2351. X
  2352. X--- 137,144 -----
  2353. X  .SH BUGS
  2354. X  The atan() function does not work correctly for complex arguments.
  2355. X  .br
  2356. X+ The bessel functions do not work for complex arguments.
  2357. X+ .br
  2358. X  See the 
  2359. X  .I help bugs
  2360. X  command in gnuplot.
  2361. X***************
  2362. X*** 95,97
  2363. X  command in gnuplot.
  2364. X  .SH SEE ALSO
  2365. X  See the printed manual or the on-line help for details on specific commands.
  2366. X
  2367. X--- 144,148 -----
  2368. X  command in gnuplot.
  2369. X  .SH SEE ALSO
  2370. X  See the printed manual or the on-line help for details on specific commands.
  2371. X+ .br
  2372. X+ X(1).
  2373. Xdiff -cr ./docs/gnuplot.doc ../patch/docs/gnuplot.doc
  2374. X*** ./docs/gnuplot.doc    Tue Mar 27 08:59:55 1990
  2375. X--- ../patch/docs/gnuplot.doc    Wed Sep 12 17:36:14 1990
  2376. X***************
  2377. X*** 21,26
  2378. X   many commands.
  2379. X  
  2380. X   For help on any topic, type 'help' followed by the name of the topic.
  2381. X  2 clear
  2382. X  ?clear
  2383. X   The `clear` command erases the current screen or output device as
  2384. X
  2385. X--- 21,39 -----
  2386. X   many commands.
  2387. X  
  2388. X   For help on any topic, type 'help' followed by the name of the topic.
  2389. X+ 2 cd
  2390. X+ ?cd
  2391. X+  The `cd` command changes working directory.
  2392. X+  
  2393. X+  Syntax:
  2394. X+          cd <directory-name>
  2395. X+  
  2396. X+  The directory name must be enclosed in quotes.
  2397. X+  
  2398. X+  Examples:
  2399. X+  
  2400. X+          cd 'subdir'
  2401. X+          cd ".."
  2402. X  2 clear
  2403. X  ?clear
  2404. X   The `clear` command erases the current screen or output device as
  2405. X***************
  2406. X*** 30,36
  2407. X  ?comments
  2408. X   Comments are supported as follows: a # may appear in most places in a line
  2409. X   and GNUPLOT will ignore the rest of the line. It will not have this
  2410. X!  affect inside quotes, inside numbers (including complex numbers), inside
  2411. X   command substitutions, etc. In short, it works anywhere it makes sense
  2412. X   to work.
  2413. X  2 environment
  2414. X
  2415. X--- 43,49 -----
  2416. X  ?comments
  2417. X   Comments are supported as follows: a # may appear in most places in a line
  2418. X   and GNUPLOT will ignore the rest of the line. It will not have this
  2419. X!  effect inside quotes, inside numbers (including complex numbers), inside
  2420. X   command substitutions, etc. In short, it works anywhere it makes sense
  2421. X   to work.
  2422. X  2 environment
  2423. X***************
  2424. X*** 49,56
  2425. X   On VMS, the symbol GNUPLOT$HELP should be defined as the name of 
  2426. X   the help library for gnuplot.
  2427. X   
  2428. X!  On Unix, HOME is used as the name of a directory to search for a 
  2429. X!  .gnuplot file if none is found in the current directory. 
  2430. X   On MS-DOS, GNUPLOT is used.  On VMS, SYS$LOGIN: is used.  
  2431. X   See help start-up.  
  2432. X   
  2433. X
  2434. X--- 62,69 -----
  2435. X   On VMS, the symbol GNUPLOT$HELP should be defined as the name of 
  2436. X   the help library for gnuplot.
  2437. X   
  2438. X!  On Unix, HOME is used as the name of a directory to search for 
  2439. X!  a .gnuplot file if none is found in the current directory. 
  2440. X   On MS-DOS, GNUPLOT is used.  On VMS, SYS$LOGIN: is used.  
  2441. X   See help start-up.  
  2442. X   
  2443. X***************
  2444. X*** 653,658
  2445. X           print <expression>
  2446. X   
  2447. X   See `expressions`.
  2448. X  2 quit
  2449. X  ?quit
  2450. X   The `exit` and `quit` commands and your computer's END-OF-FILE
  2451. X
  2452. X--- 666,677 -----
  2453. X           print <expression>
  2454. X   
  2455. X   See `expressions`.
  2456. X+ 2 pwd
  2457. X+ ?pwd
  2458. X+  The `pwd` command prints the name of the working directory to the screen.
  2459. X+  
  2460. X+  Syntax:
  2461. X+          pwd
  2462. X  2 quit
  2463. X  ?quit
  2464. X   The `exit` and `quit` commands and your computer's END-OF-FILE
  2465. X***************
  2466. X*** 1400,1405
  2467. X  ?bugs
  2468. X   The atan() function does not work correctly for complex arguments.
  2469. X   
  2470. X   The most important known bug is actually in the stdio library for the
  2471. X   Sun4 operating system (SunOS Sys4-3.2). The "%g" format for `printf`
  2472. X   sometimes incorrectly prints numbers (e.g., 200000.0 as "2").  Thus,
  2473. X
  2474. X--- 1419,1426 -----
  2475. X  ?bugs
  2476. X   The atan() function does not work correctly for complex arguments.
  2477. X   
  2478. X+  The bessel functions do not work for complex arguments.
  2479. X+  
  2480. X   The most important known bug is actually in the stdio library for the
  2481. X   Sun4 operating system (SunOS Sys4-3.2). The "%g" format for `printf`
  2482. X   sometimes incorrectly prints numbers (e.g., 200000.0 as "2").  Thus,
  2483. X***************
  2484. X*** 1446,1448
  2485. X   %g format than release 2.4, but not much.  Trailing decimal points are 
  2486. X   now removed, but trailing zeros are still not removed from %g numbers 
  2487. X   in exponential format.
  2488. X
  2489. X--- 1467,1472 -----
  2490. X   %g format than release 2.4, but not much.  Trailing decimal points are 
  2491. X   now removed, but trailing zeros are still not removed from %g numbers 
  2492. X   in exponential format.
  2493. X+  
  2494. X+  Please report any bugs you find to pixar!bug-gnuplot@sun.com or
  2495. X+  pixar!bug-gnuplot@ucbvax.berkeley.edu.
  2496. XCommon subdirectories: ./docs/latextut and ../patch/docs/latextut
  2497. Xdiff -cr ./docs/latextut/tutorial.tex ../patch/docs/latextut/tutorial.tex
  2498. X*** ./docs/latextut/tutorial.tex    Tue Mar 27 09:00:42 1990
  2499. X--- ../patch/docs/latextut/tutorial.tex    Tue Aug 28 16:17:28 1990
  2500. X***************
  2501. X*** 57,62
  2502. X  and may produce better-looking plots. See Section~\ref{s:eepic} for
  2503. X  more information.
  2504. X  
  2505. X  \section{Using GNUPLOT for \LaTeX: a Tutorial}
  2506. X  
  2507. X  GNUPLOT is by nature an interactive program. Users making plots for
  2508. X
  2509. X--- 57,68 -----
  2510. X  and may produce better-looking plots. See Section~\ref{s:eepic} for
  2511. X  more information.
  2512. X  
  2513. X+ There is a small package of auxiliary files (makefiles and scripts)
  2514. X+ that I find useful for making \LaTeX\ plots with GNUPLOT. This is
  2515. X+ available for \verb+ftp+ as \verb+pub/gnuplot-latex.shar+ from
  2516. X+ \verb+cs.duke.edu+. I can mail copies (see the end of this paper for
  2517. X+ information).
  2518. X+ 
  2519. X  \section{Using GNUPLOT for \LaTeX: a Tutorial}
  2520. X  
  2521. X  GNUPLOT is by nature an interactive program. Users making plots for
  2522. X***************
  2523. X*** 500,505
  2524. X  may be changed.
  2525. X  
  2526. X  \section{Contact}
  2527. X! Please contact me at dfk@cs.duke.edu with any comments you may have.
  2528. X  
  2529. X  \end{document}
  2530. X
  2531. X--- 506,515 -----
  2532. X  may be changed.
  2533. X  
  2534. X  \section{Contact}
  2535. X! Please contact me at \verb+dfk@cs.duke.edu+ with any comments you may
  2536. X! have on GNUPLOT's \LaTeX\ driver. For general GNUPLOT questions, send
  2537. X! mail to the GNUPLOT mailing list
  2538. X! (\verb+pixar!info-gnuplot@ucbvax.berkeley.edu+). 
  2539. X! 
  2540. X  
  2541. X  \end{document}
  2542. Xdiff -c ./translate/command.c ../patch/translate/command.c
  2543. X*** ./translate/command.c    Tue Mar 27 09:03:58 1990
  2544. X--- ../patch/translate/command.c    Tue Aug 28 16:07:33 1990
  2545. X***************
  2546. X*** 983,989
  2547. X      err_msg(message);
  2548. X  
  2549. X      if (point && line)
  2550. X!      return(LINESPOINTS);
  2551. X      if (point)
  2552. X       return(POINTS);
  2553. X      if (line)
  2554. X
  2555. X--- 983,989 -----
  2556. X      err_msg(message);
  2557. X  
  2558. X      if (point && line)
  2559. X!      return((int)LINESPOINTS);
  2560. X      if (point)
  2561. X       return((int)POINTS);
  2562. X      if (line)
  2563. X***************
  2564. X*** 985,991
  2565. X      if (point && line)
  2566. X       return(LINESPOINTS);
  2567. X      if (point)
  2568. X!      return(POINTS);
  2569. X      if (line)
  2570. X       return(LINES);
  2571. X  
  2572. X
  2573. X--- 985,991 -----
  2574. X      if (point && line)
  2575. X       return((int)LINESPOINTS);
  2576. X      if (point)
  2577. X!      return((int)POINTS);
  2578. X      if (line)
  2579. X       return((int)LINES);
  2580. X  
  2581. X***************
  2582. X*** 987,993
  2583. X      if (point)
  2584. X       return(POINTS);
  2585. X      if (line)
  2586. X!      return(LINES);
  2587. X  
  2588. X      /* should not happen */
  2589. X      err_msg("no standard style corresponds to this style");
  2590. X
  2591. X--- 987,993 -----
  2592. X      if (point)
  2593. X       return((int)POINTS);
  2594. X      if (line)
  2595. X!      return((int)LINES);
  2596. X  
  2597. X      /* should not happen */
  2598. X      err_msg("no standard style corresponds to this style");
  2599. X***************
  2600. X*** 991,997
  2601. X  
  2602. X      /* should not happen */
  2603. X      err_msg("no standard style corresponds to this style");
  2604. X!     return(LINES);
  2605. X  }
  2606. X  
  2607. X  
  2608. X
  2609. X--- 991,997 -----
  2610. X  
  2611. X      /* should not happen */
  2612. X      err_msg("no standard style corresponds to this style");
  2613. X!     return((int)LINES);
  2614. X  }
  2615. X  
  2616. X  
  2617. END_OF_patch1b
  2618. if test 63974 -ne `wc -c <patch1b`; then
  2619.     echo shar: \"patch1b\" unpacked with wrong size!
  2620. fi
  2621. # end of overwriting check
  2622. fi
  2623. echo shar: End of shell archive.
  2624. exit 0
  2625.  
  2626.